1000
It is possible to search for an item ( inside the Editor ), case insensitive

public void init()
{
	COM com_Editor,com_Items;
	anytype var_Editor,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	var_Editor = COM::createFromVariant(exgrid1.Columns().Add("DropDownList")).Editor(); com_Editor = var_Editor;
		com_Editor.EditType(3/*DropDownListType*/);
		com_Editor.AddItem(1,"One");
		com_Editor.AddItem(2,"Two");
		com_Editor.AddItem(3,"Three");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.AddItem(exgrid1.Columns().Item(COMVariant::createFromInt(0)).Editor().FindItem(">ONE"));
		com_Items.AddItem(exgrid1.Columns().Item(COMVariant::createFromInt(0)).Editor().FindItem(">ThRee"));
		com_Items.AddItem(exgrid1.Columns().Item(COMVariant::createFromInt(0)).Editor().FindItem("ONE"));
		com_Items.AddItem(exgrid1.Columns().Item(COMVariant::createFromInt(0)).Editor().FindItem(">tWo"));
	exgrid1.EndUpdate();
}
999
The text after the BR-tag is in same line as the text before the BR-tag (entire column)

public void init()
{
	COM com_Column,com_Items;
	anytype var_Column,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.DrawGridLines(1/*exHLines*/);
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("Default")); com_Column = var_Column;
		com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1));
		com_Column.Def(16/*exCellSingleLine*/,COMVariant::createFromBoolean(false));
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.AddItem("This is the first line.<br>This is the second line.");
		com_Items.AddItem("This is the first line.<br>This is the second line.");
		com_Items.AddItem("This is the first line.<br>This is the second line.");
	exgrid1.EndUpdate();
}
998
The text after the BR-tag is in same line as the text before the BR-tag (individual)

public void init()
{
	COM com_Items;
	anytype var_Items;
	int h;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.DrawGridLines(1/*exHLines*/);
	exgrid1.Columns().Add("Default");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.CellValueFormat(com_Items.AddItem("This is the first line.<br>This is the second line."),COMVariant::createFromInt(0),1/*exHTML*/);
		h = com_Items.AddItem("<b>This is the first line.<br>This is the second line.</b>");
		com_Items.CellValueFormat(h,COMVariant::createFromInt(0),1/*exHTML*/);
		com_Items.CellSingleLine(h,COMVariant::createFromInt(0),false);
		com_Items.CellValueFormat(com_Items.AddItem("This is the first line.<br>This is the second line."),COMVariant::createFromInt(0),1/*exHTML*/);
	exgrid1.EndUpdate();
}
997
Can I disable an item once the user selects a new value into a different item

// Change event - Occurs when the user changes the cell's content.
void onEvent_Change(int   _Item,int   _ColIndex,COMVariant /*variant*/   _NewValue)
{
	COM com_Items;
	anytype var_Items;
	;
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.EnableItem(com_Items.ItemByIndex(1),_NewValue);
}

public void init()
{
	COM com_Editor,com_Items;
	anytype var_Editor,var_Items;
	int h1,h2;
	;

	super();

	exgrid1.FreezeEvents(true);
	exgrid1.BeginUpdate();
	exgrid1.ScrollBySingleLine(true);
	exgrid1.DrawGridLines(-2/*exRowLines*/);
	exgrid1.Columns().Add("Q");
	exgrid1.Columns().Add("A");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h1 = com_Items.AddItem("What's your gender?");
		var_Editor = com_Items.CellEditor(h1,COMVariant::createFromInt(1)); com_Editor = var_Editor;
			com_Editor.EditType(3/*DropDownListType*/);
			com_Editor.AddItem(1,"Male");
			com_Editor.AddItem(0,"Female");
		com_Items.CellValue(h1,COMVariant::createFromInt(1),COMVariant::createFromInt(1));
		h2 = com_Items.AddItem("What's pet name?");
		com_Items.CellValue(h2,COMVariant::createFromInt(1),"This is my pet favorite long long long name, that shoul break the line in multiple pieces");
		com_Items.CellSingleLine(h2,COMVariant::createFromInt(1),false);
	exgrid1.EndUpdate();
	exgrid1.FreezeEvents(false);
}
996
How can I get a row expanded / enlarged to fit the cell's text (entire column)

public void init()
{
	COM com_Column,com_Editor,com_Items;
	anytype var_Column,var_Editor,var_Items;
	int h1,h2;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ScrollBySingleLine(true);
	exgrid1.DrawGridLines(-2/*exRowLines*/);
	exgrid1.Columns().Add("Q");
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("A")); com_Column = var_Column;
		com_Column.Def(16/*exCellSingleLine*/,COMVariant::createFromBoolean(false));
		var_Editor = com_Column.Editor(); com_Editor = var_Editor;
			com_Editor.EditType(5/*MemoType*/);
			com_Editor.Appearance(8/*SingleApp*/);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h1 = com_Items.AddItem("What's name?");
		com_Items.CellValue(h1,COMVariant::createFromInt(1),"This is my pet favorite long long long name, that shoul break the line in multiple pieces");
		h2 = com_Items.AddItem("What's your pet name?");
		com_Items.CellValue(h2,COMVariant::createFromInt(1),"This is my pet favorite long long long name, that shoul break the line in multiple pieces");
	exgrid1.EndUpdate();
}
995
How can I get a row expanded / enlarged to fit the cell's text (individual cell)

public void init()
{
	COM com_Editor,com_Items;
	anytype var_Editor,var_Items;
	int h1,h2;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ScrollBySingleLine(true);
	exgrid1.DrawGridLines(-2/*exRowLines*/);
	exgrid1.Columns().Add("Q");
	exgrid1.Columns().Add("A");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h1 = com_Items.AddItem("What's name?");
		com_Items.CellValue(h1,COMVariant::createFromInt(1),"This is my pet favorite long long long name, that shoul break the line in multiple pieces");
		h2 = com_Items.AddItem("What's your pet name?");
		var_Editor = com_Items.CellEditor(h2,COMVariant::createFromInt(1)); com_Editor = var_Editor;
			com_Editor.EditType(5/*MemoType*/);
			com_Editor.Appearance(8/*SingleApp*/);
		com_Items.CellValue(h2,COMVariant::createFromInt(1),"This is my pet favorite long long long name, that shoul break the line in multiple pieces");
		com_Items.CellSingleLine(h2,COMVariant::createFromInt(1),false);
	exgrid1.EndUpdate();
}
994
InsertControlItem / UserEditor / A2X:

public void init()
{
	COM com_ConditionalFormat,com_Items;
	anytype var_ConditionalFormat,var_Items;
	int h,hX;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.BackColor(WinApi::RGB2int(240,240,240));
	var_ConditionalFormat = COM::createFromObject(exgrid1.ConditionalFormats()).Add("1 = 1"); com_ConditionalFormat = var_ConditionalFormat;
	com_ConditionalFormat.Bold(true);
	COM::createFromVariant(exgrid1.Columns().Add("Type")).Alignment(2/*RightAlignment*/);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h = com_Items.AddItem("1. A ProgID such as \"MSCAL.Calendar.7\"");
		com_Items.ItemDivider(h,0);
		hX = com_Items.InsertControlItem(0,"MSCAL.Calendar","");
		COM::createFromVariant(com_Items.ItemObject(hX)).BackColor(WinApi::RGB2int(255,255,255));
		h = com_Items.AddItem("2. A CLSID such as \"{0036F83C-D892-4B7B-AA0B-BEDD8D16A738}\"");
		com_Items.ItemDivider(h,0);
		hX = com_Items.InsertControlItem(0,"{0036F83C-D892-4B7B-AA0B-BEDD8D16A738}","");
		h = com_Items.AddItem("3. A URL such as \"http://www.exontrol.com\"");
		com_Items.ItemDivider(h,0);
		hX = com_Items.InsertControlItem(0,"http://www.exontrol.com","");
		h = com_Items.AddItem("4. A reference to an Active document such as \"file://\\\\Documents\\MyDoc.doc\"");
		com_Items.ItemDivider(h,0);
		hX = com_Items.InsertControlItem(0,"file://C:\\empesting.xml","");
		h = com_Items.AddItem("5.A fragment of HTML such as \"MSHTML:<HTML><BODY>This is a line of text</BODY></HTML>\"");
		com_Items.ItemDivider(h,0);
		hX = com_Items.InsertControlItem(0,"MSHTML:<HTML><BODY>This is a <b>line of</b> text</BODY></HTML>","");
		com_Items.ItemHeight(hX,56);
		h = com_Items.AddItem("6.Anything, if it is preffixed by \"A2X:\"");
		com_Items.ItemDivider(h,0);
		hX = com_Items.InsertControlItem(0,"A2X:TOC24.Toc24Ctrl.1","");
	exgrid1.EndUpdate();
}
993
How do I add a RichTextBox editor
// UserEditorOleEvent event - Occurs when an user editor fires an event.
void onEvent_UserEditorOleEvent(COM   _Object,COM   _Ev,COMVariant /*bool*/   _CloseEditor,int   _Item,int   _ColIndex)
{
	;
	print( _Ev );
}

public void init()
{
	COM com_Editor,com_Items,com_RichTextBox;
	anytype var_Editor,var_Items,var_RichTextBox;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.DrawGridLines(-1/*exAllLines*/);
	exgrid1.DefaultItemHeight(32);
	var_Editor = COM::createFromVariant(exgrid1.Columns().Add("RICHTEXT")).Editor(); com_Editor = var_Editor;
		com_Editor.EditType(16/*UserEditorType*/);
		com_Editor.UserEditor("RICHTEXT.RichtextCtrl","");
		// Add 'Microsoft Rich Textbox Control 6.0 (SP4)(richtx32.ocx)' reference to your project.
		var_RichTextBox = com_Editor.UserEditorObject(); com_RichTextBox = var_RichTextBox;
			com_RichTextBox.AutoVerbMenu(true);
			com_RichTextBox.TextRTF("{\\rtf1\\ansi{\\fonttbl\\f0\\fswiss Helvetica;}\\f0\\pard\\r\\nThis is some {\\b bold} text.\\par\\r\\n}");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.AddItem("RICHTEXT.RichtextCtrl");
	exgrid1.EndUpdate();
}
992
Is it possible to trap a double-click event on a specific cell and when that happens, to set the cell to a specific value
// DblClick event - Occurs when the user dblclk the left mouse button over an object.
void onEvent_DblClick(int   _Shift,int   _X,int   _Y)
{
	int h;
	;
	h = exgrid1.ItemFromPoint(-1,-1,c,hit);
	print( exgrid1.Items().CellValue(h,c) );
}

public void init()
{
	COM com_Items;
	anytype var_Items;
	int h;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.HeaderAppearance(4/*Etched*/);
	exgrid1.DrawGridLines(-2/*exRowLines*/);
	exgrid1.Columns().Add("C1");
	exgrid1.Columns().Add("C2");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.CellValue(com_Items.AddItem("Item 1"),COMVariant::createFromInt(1),"Item 2");
		com_Items.CellValue(com_Items.AddItem("Item 3"),COMVariant::createFromInt(1),"Item 4");
		com_Items.CellValue(com_Items.AddItem("Item 5"),COMVariant::createFromInt(1),"Item 6");
	exgrid1.EndUpdate();
}
991
How can I display dates in DD/MM/YYYY format

public void init()
{
	COM com_Items;
	anytype var_Items;
	int h;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ScrollBySingleLine(false);
	exgrid1.Columns().Add("Date");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.ItemDivider(com_Items.AddItem("Different Date Formats"),0);
		com_Items.FormatCell(com_Items.AddItem(COMVariant::createFromDate(str2Date("12/1/1971",213))),COMVariant::createFromInt(0),"((shortdateF(value) mid 4) left 2) + `/` + (shortdateF (value) left 2) + `/` + (shortdateF (value) right 4)");
		com_Items.FormatCell(com_Items.AddItem(COMVariant::createFromDate(str2Date("12/1/1971",213))),COMVariant::createFromInt(0),"(1 array (0:=(shortdateF(value) split `/`))) + `/` + (0 array (=:0) ) + `/` + (2 array (=:0) )");
		com_Items.FormatCell(com_Items.AddItem(COMVariant::createFromDate(str2Date("12/1/1971",213))),COMVariant::createFromInt(0),"((`0` + day(value) ) right 2) + `/` + ((`0` + month(value) ) right 2) + `/` + year(value)");
		com_Items.FormatCell(com_Items.AddItem(COMVariant::createFromDate(str2Date("12/1/1971",213))),COMVariant::createFromInt(0),"day(value) + `/` + month(value) + `/` + year(value)");
		com_Items.FormatCell(com_Items.AddItem(COMVariant::createFromDate(str2Date("12/1/1971",213))),COMVariant::createFromInt(0),"year(value) + ` - ` + day(value) + ` - ` + month(value)");
		h = com_Items.AddItem(COMVariant::createFromDate(str2Date("12/1/1971",213)));
		com_Items.ItemHeight(h,24);
		com_Items.CellValueFormat(h,COMVariant::createFromInt(0),1/*exHTML*/);
		com_Items.FormatCell(h,COMVariant::createFromInt(0),"`<b>` + year(value) + `</b><off -4> ` + day(value) + ` - ` + month(value)");
		com_Items.ItemDivider(com_Items.AddItem("Predefined Date Formats"),0);
		com_Items.FormatCell(com_Items.AddItem(COMVariant::createFromDate(str2Date("12/1/1971",213))),COMVariant::createFromInt(0),"value");
		com_Items.FormatCell(com_Items.AddItem(COMVariant::createFromDate(str2Date("12/1/1971",213))),COMVariant::createFromInt(0),"shortdateF(value)");
		com_Items.FormatCell(com_Items.AddItem(COMVariant::createFromDate(str2Date("12/1/1971",213))),COMVariant::createFromInt(0),"shortdate(value)");
		com_Items.FormatCell(com_Items.AddItem(COMVariant::createFromDate(str2Date("12/1/1971",213))),COMVariant::createFromInt(0),"longdate(value)");
	exgrid1.EndUpdate();
}
990
I have noticed that the column gets resized once I release the mouse. I have a column that displays multiple-lines cells, and the text gets wrapped only when user releases the mouse. Is it possible to get resized contiguously as I had before
public void init()
{
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ScrollBySingleLine(false);
	exgrid1.DrawGridLines(2/*exVLines*/);
	exgrid1.ColumnsAllowSizing(true);
	COM::createFromVariant(exgrid1.Columns().Add("Column A (cont)")).Def(64/*exColumnResizeContiguously*/,COMVariant::createFromBoolean(true));
	exgrid1.Columns().Add("Column 1");
	COM::createFromVariant(exgrid1.Columns().Add("Column B (cont)")).Def(64/*exColumnResizeContiguously*/,COMVariant::createFromBoolean(true));
	exgrid1.Columns().Add("Column 2");
	exgrid1.EndUpdate();
}
989
How do I get the column from cursor, when it hovers the empty portion of the items section
// MouseMove event - Occurs when the user moves the mouse.
void onEvent_MouseMove(int   _Button,int   _Shift,int   _X,int   _Y)
{
	int i;
	;
	i = exgrid1.ItemFromPoint(0,-1,c,hit);
	print( "Column" );
	print( c );
}

public void init()
{
	int i;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.DrawGridLines(2/*exVLines*/);
	exgrid1.Columns().Add("Column 0");
	exgrid1.Columns().Add("Column 1");
	exgrid1.Columns().Add("Column 2");
	exgrid1.EndUpdate();
}
988
How do I add items once the user clicks the empty area
// Click event - Occurs when the user presses and then releases the left mouse button over the grid control.
void onEvent_Click()
{
	COM com_Items;
	anytype var_Items;
	int i;
	;
	i = exgrid1.ItemFromPoint(0,-1,c,hit);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.CellValue(com_Items.AddItem(i),COMVariant::createFromInt(1),c);
}

public void init()
{
	COM com_Items;
	anytype var_Items;
	int i;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.Columns().Add("Number of Items to Add");
	exgrid1.Columns().Add("Click on Column");
	exgrid1.EndUpdate();
}
987
Is there any option to stop events
// AddItem event - Occurs after a new Item has been inserted to Items collection.
void onEvent_AddItem(int   _Item)
{
	;
	print( "AddItem event is fired only if FreezeEvents(False) is called" );
}

public void init()
{
	COM com_Items;
	anytype var_Items;
	int h1,h2;
	;

	super();

	exgrid1.FreezeEvents(true);
	exgrid1.BeginUpdate();
	exgrid1.DefaultItemHeight(24);
	exgrid1.Columns().Add("Task");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h1 = com_Items.AddItem("Task 1");
		h2 = com_Items.AddItem("Task 2");
	exgrid1.EndUpdate();
	exgrid1.FreezeEvents(false);
}
986
How can I include the child items, when a filter is applied

public void init()
{
	COM com_Columns,com_Items;
	anytype var_Columns,var_Items;
	int h0;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ColumnAutoResize(true);
	exgrid1.ContinueColumnScroll(0);
	exgrid1.MarkSearchColumn(false);
	exgrid1.SearchColumnIndex(1);
	exgrid1.Indent(16);
	exgrid1.LinesAtRoot(-1/*exLinesAtRoot*/);
	exgrid1.FilterBarPromptVisible(1/*exFilterBarPromptVisible*/);
	exgrid1.FilterBarPromptPattern("Nancy");
	exgrid1.FilterInclude(1/*exItemsWithChilds*/);
	var_Columns = exgrid1.Columns(); com_Columns = var_Columns;
		COM::createFromVariant(com_Columns.Add("Name")).Width(96);
		COM::createFromVariant(com_Columns.Add("Title")).Width(96);
		com_Columns.Add("City");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h0 = com_Items.AddItem("Nancy Davolio");
		com_Items.CellValue(h0,COMVariant::createFromInt(1),"Sales Representative");
		com_Items.CellValue(h0,COMVariant::createFromInt(2),"Seattle");
		h0 = com_Items.InsertItem(h0,,"Andrew Fuller");
		com_Items.CellValue(h0,COMVariant::createFromInt(1),"Vice President, Sales");
		com_Items.CellValue(h0,COMVariant::createFromInt(2),"Tacoma");
		h0 = com_Items.InsertItem(h0,,"Michael Suyama");
		com_Items.CellValue(h0,COMVariant::createFromInt(1),"Sales Representative");
		com_Items.CellValue(h0,COMVariant::createFromInt(2),"London");
		h0 = com_Items.AddItem("Janet Leverling");
		com_Items.CellValue(h0,COMVariant::createFromInt(1),"Sales Representative");
		com_Items.CellValue(h0,COMVariant::createFromInt(2),"Kirkland");
		h0 = com_Items.InsertItem(h0,,"Margaret Peacock");
		com_Items.CellValue(h0,COMVariant::createFromInt(1),"Sales Representative");
		com_Items.CellValue(h0,COMVariant::createFromInt(2),"Redmond");
		com_Items.ExpandItem(0,true);
	exgrid1.ApplyFilter();
	exgrid1.EndUpdate();
}
985
How do I prevent changing the cell's state ( check-box state )
// CellStateChanging event - Fired before cell's state is about to be changed.
void onEvent_CellStateChanging(int   _Item,int   _ColIndex,COMVariant /*long*/   _NewState)
{
	COM com_Items;
	anytype var_Items;
	;
	var_Items = exgrid1.Items(); com_Items = var_Items;
		_NewState = com_Items.CellState(_Item,_ColIndex);
}

public void init()
{
	COM com_Column,com_Column1,com_Items;
	anytype var_Column,var_Column1,var_Items;
	int h;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.LinesAtRoot(-1/*exLinesAtRoot*/);
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("P1")); com_Column = var_Column;
		com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true));
		com_Column.PartialCheck(true);
	var_Column1 = COM::createFromVariant(exgrid1.Columns().Add("P2")); com_Column1 = var_Column1;
		com_Column1.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true));
		com_Column1.PartialCheck(true);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h = com_Items.AddItem("Root");
		com_Items.InsertItem(h,,"Child 1");
		com_Items.InsertItem(h,,"Child 2");
		com_Items.ExpandItem(h,true);
	exgrid1.EndUpdate();
}
984
How do I get sorted the column as string, numeric, date, date and time. Also how can it be applied to drop down filter panel

public void init()
{
	COM com_Column,com_Column1,com_Column2,com_Column3,com_Column4,com_Column5,com_Items;
	anytype var_Column,var_Column1,var_Column2,var_Column3,var_Column4,var_Column5,var_Items;
	int h;
	;

	super();

	exgrid1.BeginUpdate();
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("Date")); com_Column = var_Column;
		com_Column.SortType(2/*SortDate*/);
		com_Column.DisplayFilterButton(true);
		com_Column.DisplayFilterPattern(false);
		com_Column.DisplayFilterDate(true);
		com_Column.FilterList(1296/*exShowFocusItem | exShowCheckBox | exSortItemsDesc*/);
	var_Column1 = COM::createFromVariant(exgrid1.Columns().Add("DateTime")); com_Column1 = var_Column1;
		com_Column1.SortType(3/*SortDateTime*/);
		com_Column1.DisplayFilterButton(true);
		com_Column1.DisplayFilterPattern(false);
		com_Column1.FilterList(1296/*exShowFocusItem | exShowCheckBox | exSortItemsDesc*/);
	var_Column2 = COM::createFromVariant(exgrid1.Columns().Add("Time")); com_Column2 = var_Column2;
		com_Column2.SortType(4/*SortTime*/);
		com_Column2.DisplayFilterButton(true);
		com_Column2.DisplayFilterPattern(false);
		com_Column2.FilterList(1296/*exShowFocusItem | exShowCheckBox | exSortItemsDesc*/);
		com_Column2.FormatColumn("time(value)");
	var_Column3 = COM::createFromVariant(exgrid1.Columns().Add("Numeric")); com_Column3 = var_Column3;
		com_Column3.SortType(1/*SortNumeric*/);
		com_Column3.DisplayFilterButton(true);
		com_Column3.FilterList(1296/*exShowFocusItem | exShowCheckBox | exSortItemsDesc*/);
	var_Column4 = COM::createFromVariant(exgrid1.Columns().Add("String")); com_Column4 = var_Column4;
		com_Column4.DisplayFilterButton(true);
		com_Column4.FilterList(1296/*exShowFocusItem | exShowCheckBox | exSortItemsDesc*/);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h = com_Items.AddItem(COMVariant::createFromDate(str2Date("1/27/2010",213)));
		com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromUtcDateTime(str2Datetime("1/27/2010 10:00:00",213)));
		com_Items.CellValue(h,COMVariant::createFromInt(2),com_Items.CellValue(h,COMVariant::createFromInt(1)));
		com_Items.CellValue(h,COMVariant::createFromInt(3),COMVariant::createFromInt(1));
		com_Items.CellValue(h,COMVariant::createFromInt(4),com_Items.CellValue(h,COMVariant::createFromInt(3)));
		h = com_Items.AddItem(COMVariant::createFromDate(str2Date("1/27/2011",213)));
		com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromUtcDateTime(str2Datetime("1/27/2011 9:00:00",213)));
		com_Items.CellValue(h,COMVariant::createFromInt(2),com_Items.CellValue(h,COMVariant::createFromInt(1)));
		com_Items.CellValue(h,COMVariant::createFromInt(3),COMVariant::createFromInt(11));
		com_Items.CellValue(h,COMVariant::createFromInt(4),com_Items.CellValue(h,COMVariant::createFromInt(3)));
		h = com_Items.AddItem(COMVariant::createFromDate(str2Date("11/2/2010",213)));
		com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromUtcDateTime(str2Datetime("11/2/2010 9:00:00",213)));
		com_Items.CellValue(h,COMVariant::createFromInt(2),com_Items.CellValue(h,COMVariant::createFromInt(1)));
		com_Items.CellValue(h,COMVariant::createFromInt(3),COMVariant::createFromInt(2));
		com_Items.CellValue(h,COMVariant::createFromInt(4),com_Items.CellValue(h,COMVariant::createFromInt(3)));
	var_Column5 = COM::createFromObject(exgrid1.Columns()).Item("DateTime"); com_Column5 = var_Column5;
	com_Column5.DisplayFilterDate(false);
	exgrid1.EndUpdate();
}
983
I am using Layout property to sort multiple columns at once. The problem is that all items get expanded. How do I prevent that

public void init()
{
	COM com_Column,com_Column1,com_Items;
	anytype var_Column,var_Column1,var_Items;
	int h;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.LinesAtRoot(-1/*exLinesAtRoot*/);
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("P1")); com_Column = var_Column;
		com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true));
		com_Column.PartialCheck(true);
	var_Column1 = COM::createFromVariant(exgrid1.Columns().Add("P2")); com_Column1 = var_Column1;
		com_Column1.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true));
		com_Column1.PartialCheck(true);
		com_Column1.FormatColumn("1 index ``");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h = com_Items.AddItem("Root");
		com_Items.InsertItem(h,,"Child A");
		com_Items.InsertItem(h,,"Child B");
		com_Items.InsertItem(h,,"Child A");
		com_Items.InsertItem(h,,"Child B");
		com_Items.AddItem("Root");
		com_Items.AddItem("Root");
	exgrid1.SingleSort(false);
	exgrid1.Layout("multiplesort=\"C0:1 C1:2\";collapse=\"\"");
	exgrid1.EndUpdate();
}
982
How do I find the cell's type, or what the cell holds

public void init()
{
	COM com_Columns,com_Items;
	anytype var_Columns,var_Items;
	str var_s;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.DrawGridLines(-2/*exRowLines*/);
	var_Columns = exgrid1.Columns(); com_Columns = var_Columns;
		COM::createFromVariant(com_Columns.Add("Value")).Width(24);
		COM::createFromVariant(com_Columns.Add("Type")).FormatColumn("type(%0)");
		var_s = "(0 := type(%0)) array (`empty`, `null`, `short`, `long`, `float`, `double`, `currency`, `date`, `string`, `object`, `error`, `bo";
		var_s = var_s + "olean`, `variant`, `any`, `reserved`, `decimal`, `char`, `byte`, `unsigned short`, `unsigned long`, `long on 64 bits`)";
		COM::createFromVariant(com_Columns.Add("TypeAsString")).FormatColumn(var_s);
		COM::createFromVariant(com_Columns.Add("Length")).FormatColumn("len(%0)");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.AddItem();
		com_Items.AddItem("");
		com_Items.CellValue(.AddItem(),COMVariant::createFromInt(0),COM::createFromVariant(exgrid1));
		com_Items.CellValue(com_Items.AddItem(),COMVariant::createFromInt(0),COMVariant::createFromBoolean(true));
		com_Items.CellValue(com_Items.AddItem(),COMVariant::createFromInt(0),COMVariant::createFromInt(-1));
		com_Items.CellValue(com_Items.AddItem(),COMVariant::createFromInt(0),COMVariant::createFromInt(-1));
		com_Items.CellValue(com_Items.AddItem(),COMVariant::createFromInt(0),COMVariant::createFromDate(str2Date("1/1/2001",213)));
	exgrid1.EndUpdate();
}
981
How can I get ride / hide the image being dragged by OLE Drag and Drop
// OLEStartDrag event is not supported. Use the DragEnter,DragLeave,DragOver, DragDrop ... events.
public void init()
{
	COM com_Items;
	anytype var_Items;
	int h;
	;

	super();

	exgrid1.OLEDropMode(1/*exOLEDropManual*/);
	exgrid1.Background(34/*exDragDropAfter*/,WinApi::RGB2int(255,255,255));
	exgrid1.LinesAtRoot(-1/*exLinesAtRoot*/);
	exgrid1.Columns().Add("Default");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h = com_Items.AddItem("Root");
		com_Items.InsertItem(h,,"Child 1");
		com_Items.InsertItem(h,,"Child 2");
		com_Items.ExpandItem(h,true);
}
980
The ReadOnly property does not prevent changing the column's check-box (sample 2)

public void init()
{
	COM com_Column,com_Column1,com_Editor,com_Items;
	anytype var_Column,var_Column1,var_Editor,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ShowFocusRect(false);
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("C1")); com_Column = var_Column;
		com_Column.AllowSizing(false);
		com_Column.Width(18);
		var_Editor = COM::createFromObject(com_Column.Editor()); com_Editor = var_Editor;
		com_Editor.EditType(19/*CheckValueType*/);
	exgrid1.Columns().Add("C2");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(0)),COMVariant::createFromInt(1),"Item 1");
		com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(-1)),COMVariant::createFromInt(1),"Item 2");
		com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(0)),COMVariant::createFromInt(1),"Item 3");
	exgrid1.ReadOnly(true);
	var_Column1 = COM::createFromObject(exgrid1.Columns()).Item(COMVariant::createFromInt(0)); com_Column1 = var_Column1;
	var_Editor = COM::createFromObject(com_Column1).Editor(); com_Editor = var_Editor;
	com_Editor.Option(17/*exCheckValue2*/,COMVariant::createFromInt(2));
	exgrid1.EndUpdate();
}
979
The ReadOnly property does not prevent changing the column's check-box (sample 1)

public void init()
{
	COM com_Column,com_Editor,com_Items;
	anytype var_Column,var_Editor,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ShowFocusRect(false);
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("C1")); com_Column = var_Column;
		com_Column.AllowSizing(false);
		com_Column.Width(18);
		var_Editor = com_Column.Editor(); com_Editor = var_Editor;
			com_Editor.EditType(19/*CheckValueType*/);
			com_Editor.Option(17/*exCheckValue2*/,COMVariant::createFromInt(1));
	exgrid1.Columns().Add("C2");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(0)),COMVariant::createFromInt(1),"Item 1");
		com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(-1)),COMVariant::createFromInt(1),"Item 2");
		com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(0)),COMVariant::createFromInt(1),"Item 3");
	exgrid1.ReadOnly(true);
	exgrid1.EndUpdate();
}
978
How can I export checked items only

public void init()
{
	COM com_Columns,com_Items;
	anytype var_Columns,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	var_Columns = exgrid1.Columns(); com_Columns = var_Columns;
		COM::createFromVariant(com_Columns.Add("C1")).Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true));
		COM::createFromVariant(com_Columns.Add("C2")).FormatColumn("1 index `A-Z`");
		COM::createFromVariant(com_Columns.Add("C3")).FormatColumn("100 index ``");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.AddItem("Item 1");
		com_Items.CellState(com_Items.AddItem("Item 2"),1);
		com_Items.CellState(com_Items.AddItem("Item 3"),1);
	exgrid1.EndUpdate();
	print( "Export CSV Checked Items Only:" );
	print( exgrid1.Export("","chk") );
}
977
How can I export a hidden column

public void init()
{
	COM com_Column,com_Column1,com_Columns,com_Items;
	anytype var_Column,var_Column1,var_Columns,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	var_Columns = exgrid1.Columns(); com_Columns = var_Columns;
		com_Columns.Add("C1");
		var_Column = COM::createFromVariant(com_Columns.Add("C2")); com_Column = var_Column;
			com_Column.FormatColumn("1 index `A-Z`");
			com_Column.Visible(false);
		var_Column1 = COM::createFromVariant(com_Columns.Add("C3")); com_Column1 = var_Column1;
			com_Column1.FormatColumn("100 index ``");
			com_Column1.Visible(false);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.AddItem("Item 1");
		com_Items.AddItem("Item 2");
		com_Items.AddItem("Item 3");
	exgrid1.EndUpdate();
	print( "Export CSV Hidden Columns (1,2):" );
	print( exgrid1.Export("","|1,2") );
}
976
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 3)

public void init()
{
	COM com_Column,com_Columns,com_Items;
	anytype var_Column,var_Columns,var_Items;
	int h,hChild;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.LinesAtRoot(-1/*exLinesAtRoot*/);
	exgrid1.DrawGridLines(-2/*exRowLines*/);
	exgrid1.AutoDrag(3/*exAutoDragPositionAny*/);
	exgrid1.HasLines(1/*exSolidLine*/);
	exgrid1.Indent(16);
	exgrid1.MarkSearchColumn(false);
	var_Columns = exgrid1.Columns(); com_Columns = var_Columns;
		var_Column = COM::createFromVariant(com_Columns.Add("")); com_Column = var_Column;
			com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1));
			com_Column.FormatColumn("((1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 + `` :  (=:0 mid (1 + 1 + =:1) )  + `)` ) + ` ` + value");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h = com_Items.AddItem("Root");
		com_Items.InsertItem(h,,"Child");
		hChild = com_Items.InsertItem(h,,"Child");
		com_Items.InsertItem(hChild,,"Child");
		com_Items.InsertItem(hChild,,"Child");
		com_Items.InsertItem(hChild,,"Child");
		com_Items.InsertItem(h,,"Child");
		com_Items.ExpandItem(0,true);
		h = com_Items.AddItem("Root");
		com_Items.InsertItem(h,,"Child");
		hChild = com_Items.InsertItem(h,,"Child");
		com_Items.CellState(hChild,COMVariant::createFromInt(0),1);
		com_Items.InsertItem(hChild,,"Child");
		com_Items.InsertItem(hChild,,"Child");
		com_Items.InsertItem(hChild,,"Child");
		com_Items.InsertItem(h,,"Child");
	exgrid1.EndUpdate();
}
975
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 2)

public void init()
{
	COM com_Column,com_Columns,com_Items;
	anytype var_Column,var_Columns,var_Items;
	int h,hChild;
	str var_s;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.LinesAtRoot(-1/*exLinesAtRoot*/);
	exgrid1.GridLineColor(WinApi::RGB2int(190,190,190));
	exgrid1.DrawGridLines(-2/*exRowLines*/);
	exgrid1.AutoDrag(3/*exAutoDragPositionAny*/);
	exgrid1.HasLines(1/*exSolidLine*/);
	exgrid1.Indent(16);
	var_Columns = exgrid1.Columns(); com_Columns = var_Columns;
		com_Columns.Add("Default");
		var_Column = COM::createFromVariant(com_Columns.Add("")); com_Column = var_Column;
			com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1));
			com_Column.Def(49/*exCellPaddingRight*/,COMVariant::createFromInt(4));
			com_Column.AllowSizing(false);
			com_Column.Width(36);
			com_Column.Position(0);
			var_s = "(1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 : (`............` left 2 * (=:0 count `.`)) + (=:0 mid (1 + 1 + =:";
			var_s = var_s + "1) ) ";
			com_Column.FormatColumn(var_s);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h = com_Items.AddItem("Root");
		com_Items.InsertItem(h,,"Child");
		hChild = com_Items.InsertItem(h,,"Child");
		com_Items.InsertItem(hChild,,"Child");
		com_Items.InsertItem(hChild,,"Child");
		com_Items.InsertItem(hChild,,"Child");
		com_Items.InsertItem(h,,"Child");
		com_Items.ExpandItem(0,true);
		h = com_Items.AddItem("Root");
		com_Items.InsertItem(h,,"Child");
		hChild = com_Items.InsertItem(h,,"Child");
		com_Items.CellState(hChild,COMVariant::createFromInt(0),1);
		com_Items.InsertItem(hChild,,"Child");
		com_Items.InsertItem(hChild,,"Child");
		com_Items.InsertItem(hChild,,"Child");
		com_Items.InsertItem(h,,"Child");
	exgrid1.EndUpdate();
}
974
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 1)

public void init()
{
	COM com_Column,com_Columns,com_Items;
	anytype var_Column,var_Columns,var_Items;
	int h,hChild;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.LinesAtRoot(-1/*exLinesAtRoot*/);
	exgrid1.DrawGridLines(-2/*exRowLines*/);
	exgrid1.AutoDrag(3/*exAutoDragPositionAny*/);
	exgrid1.HasLines(1/*exSolidLine*/);
	exgrid1.Indent(16);
	var_Columns = exgrid1.Columns(); com_Columns = var_Columns;
		com_Columns.Add("Default");
		var_Column = COM::createFromVariant(com_Columns.Add("")); com_Column = var_Column;
			com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1));
			com_Column.Def(49/*exCellPaddingRight*/,COMVariant::createFromInt(4));
			com_Column.Alignment(2/*RightAlignment*/);
			com_Column.AllowSizing(false);
			com_Column.Width(24);
			com_Column.Position(0);
			com_Column.FormatColumn("(1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 : `<i>` + (=:0 mid (1 + 1 + =:1) ) ");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h = com_Items.AddItem("Root");
		com_Items.InsertItem(h,,"Child");
		hChild = com_Items.InsertItem(h,,"Child");
		com_Items.InsertItem(hChild,,"Child");
		com_Items.InsertItem(hChild,,"Child");
		com_Items.InsertItem(hChild,,"Child");
		com_Items.InsertItem(h,,"Child");
		com_Items.ExpandItem(0,true);
		h = com_Items.AddItem("Root");
		com_Items.InsertItem(h,,"Child");
		hChild = com_Items.InsertItem(h,,"Child");
		com_Items.CellState(hChild,COMVariant::createFromInt(0),1);
		com_Items.InsertItem(hChild,,"Child");
		com_Items.InsertItem(hChild,,"Child");
		com_Items.InsertItem(hChild,,"Child");
		com_Items.InsertItem(h,,"Child");
	exgrid1.EndUpdate();
}
973
How can I programmatically group by columns, without having the control's sort bar visible

public void init()
{
	COM com_rs;
	anytype rs;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ColumnAutoResize(false);
	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs;
		rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exgrid1.DataSource(rs);
	exgrid1.SortBarHeight(0);
	exgrid1.SortBarVisible(true);
	exgrid1.SortBarCaption("Drag a <b>column</b> header here to group by that column.");
	exgrid1.AllowGroupBy(true);
	exgrid1.Layout("multiplesort=\"C1:2\"");
	exgrid1.EndUpdate();
}
972
How do I perform my own sort

// Sort event - Fired when the control sorts a column.
void onEvent_Sort()
{
	COM com_Items;
	anytype var_Items;
	;
	print( "Sort" );
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.ItemPosition(com_Items.ItemByIndex(1),0);
		com_Items.ItemPosition(com_Items.ItemByIndex(0),1);
}

public void init()
{
	COM com_Columns,com_Items;
	anytype var_Columns,var_Items;
	int h;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.SingleSort(false);
	exgrid1.SortOnClick(1/*exUserSort*/);
	var_Columns = exgrid1.Columns(); com_Columns = var_Columns;
		COM::createFromVariant(com_Columns.Add("Index")).FormatColumn("0 index ``");
		com_Columns.Add("Data 1");
		com_Columns.Add("Data 2");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h = com_Items.AddItem(COMVariant::createFromInt(0));
		com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromInt(2));
		com_Items.CellValue(h,COMVariant::createFromInt(2),COMVariant::createFromInt(3));
		h = com_Items.AddItem(COMVariant::createFromInt(4));
		com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromInt(5));
		com_Items.CellValue(h,COMVariant::createFromInt(2),COMVariant::createFromInt(6));
		h = com_Items.AddItem(COMVariant::createFromInt(7));
		com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromInt(8));
		com_Items.CellValue(h,COMVariant::createFromInt(2),COMVariant::createFromInt(9));
	exgrid1.Layout("multiplesort=\"C1:1 C2:2\"");
	exgrid1.EndUpdate();
}
971
Is it possible to have a different alignment for parts of the cell's caption

public void init()
{
	COM com_Column,com_Items;
	anytype var_Column,var_Items;
	int h;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.TreeColumnIndex(-1);
	exgrid1.DrawGridLines(-2/*exRowLines*/);
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("Default")); com_Column = var_Column;
		com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true));
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.CellHAlignment(com_Items.AddItem("all-left"),COMVariant::createFromInt(0),0/*LeftAlignment*/);
		com_Items.CellHAlignment(com_Items.AddItem("all-center"),COMVariant::createFromInt(0),1/*CenterAlignment*/);
		com_Items.CellHAlignment(com_Items.AddItem("all-right"),COMVariant::createFromInt(0),2/*RightAlignment*/);
		h = com_Items.AddItem("left<c>center<r>right");
		com_Items.CellValueFormat(h,COMVariant::createFromInt(0),1/*exHTML*/);
	exgrid1.EndUpdate();
}
970
I have a column with Def(exCellSingleLine) property on False, word-wrapping, and I am wondering if possible to update the column's content while user is resizing it
public void init()
{
	COM com_Column,com_Column1,com_Columns,com_Items;
	anytype var_Column,var_Column1,var_Columns,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	var_Columns = exgrid1.Columns(); com_Columns = var_Columns;
		var_Column = COM::createFromVariant(com_Columns.Add("MultipleLine")); com_Column = var_Column;
			com_Column.Width(32);
			com_Column.Def(16/*exCellSingleLine*/,COMVariant::createFromBoolean(false));
			com_Column.Def(64/*exColumnResizeContiguously*/,COMVariant::createFromBoolean(true));
		var_Column1 = COM::createFromVariant(com_Columns.Add("SingleLine")); com_Column1 = var_Column1;
			com_Column1.Def(16/*exCellSingleLine*/,COMVariant::createFromBoolean(false));
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.CellValue(com_Items.AddItem("This is a bit of long text that should break the line"),COMVariant::createFromInt(1),"This is a bit of long text that should break the line");
	exgrid1.EndUpdate();
}
969
How can I get the absolute position of an item
// MouseMove event - Occurs when the user moves the mouse.
void onEvent_MouseMove(int   _Button,int   _Shift,int   _X,int   _Y)
{
	COM com_Items;
	anytype var_Items;
	;
	var_Items = exgrid1.Items(); com_Items = var_Items;
		print( com_Items.CellCaption(exgrid1.ItemFromPoint(-1,-1,c,hit),"Position") );
}

public void init()
{
	COM com_Column,com_Items;
	anytype var_Column,var_Items;
	int h;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.BackColorAlternate(WinApi::RGB2int(240,240,240));
	exgrid1.LinesAtRoot(-1/*exLinesAtRoot*/);
	COM::createFromVariant(exgrid1.Columns().Add("Def")).DisplayFilterButton(true);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h = com_Items.AddItem("Root");
		com_Items.InsertItem(com_Items.InsertItem(h,,"Child 1"),,"Sub-Child 1");
		com_Items.InsertItem(com_Items.InsertItem(h,,"Child 2"),,"Sub-Child 2");
	exgrid1.PutItems(exgrid1.GetItems(COMVariant::createFromInt(-1)));
	exgrid1.PutItems(exgrid1.GetItems(COMVariant::createFromInt(-1)));
	exgrid1.PutItems(exgrid1.GetItems(COMVariant::createFromInt(-1)));
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("Position")); com_Column = var_Column;
		com_Column.FormatColumn("1 apos ``");
		com_Column.Visible(false);
	exgrid1.EndUpdate();
}
968
I am using ExComboBox as an user editor, how can I display a different column

// UserEditorClose event - Fired the user editor is about to be opened.
void onEvent_UserEditorClose(COM   _Object,int   _Item,int   _ColIndex)
{
	// Items.CellValue(Item,ColIndex) = Object.Value
	;
}

// UserEditorOleEvent event - Occurs when an user editor fires an event.
void onEvent_UserEditorOleEvent(COM   _Object,COM   _Ev,COMVariant /*bool*/   _CloseEditor,int   _Item,int   _ColIndex)
{
	;
	print( _Ev );
}

// UserEditorOpen event - Occurs when an user editor is about to be opened.
void onEvent_UserEditorOpen(COM   _Object,int   _Item,int   _ColIndex)
{
	// Object.Value = Me.Items.CellValue(Item,ColIndex)
	;
}

public void init()
{
	COM com_Editor,com_Items,com_Object;
	anytype var_Editor,var_Items,var_Object;
	;

	super();

	exgrid1.BeginUpdate();
	var_Editor = COM::createFromVariant(exgrid1.Columns().Add("Exontrol.ComboBox")).Editor(); com_Editor = var_Editor;
		com_Editor.EditType(16/*UserEditorType*/);
		com_Editor.UserEditor("Exontrol.ComboBox","");
		var_Object = com_Editor.UserEditorObject(); com_Object = var_Object;
	exgrid1.DrawGridLines(-2/*exRowLines*/);
	exgrid1.DefaultItemHeight(21);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.CellEditorVisible(com_Items.AddItem(COMVariant::createFromInt(10248)),COMVariant::createFromInt(0),1/*exEditorVisible*/);
		com_Items.CellEditorVisible(com_Items.AddItem(COMVariant::createFromInt(10249)),COMVariant::createFromInt(0),1/*exEditorVisible*/);
		com_Items.CellEditorVisible(com_Items.AddItem(COMVariant::createFromInt(10250)),COMVariant::createFromInt(0),1/*exEditorVisible*/);
	exgrid1.EndUpdate();
}
967
How do I sort the index column as numeric (Method 3)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void onEvent_AddItem(int   _Item)
{
	COM com_Items;
	anytype var_Items;
	;
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.CellData(_Item,COMVariant::createFromInt(1),COMVariant::createFromStr(com_Items.CellCaption(_Item,COMVariant::createFromInt(1))));
}

public void init()
{
	COM com_Column,com_Column1,com_Items;
	anytype var_Column,var_Column1,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.DrawGridLines(-1/*exAllLines*/);
	exgrid1.ColumnAutoResize(true);
	exgrid1.ShowFocusRect(false);
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("Next")); com_Column = var_Column;
		com_Column.Def(48/*exCellPaddingLeft*/,COMVariant::createFromInt(4));
		com_Column.Def(52/*exHeaderPaddingLeft*/,COMVariant::createFromInt(4));
	var_Column1 = COM::createFromVariant(exgrid1.Columns().Add("Index")); com_Column1 = var_Column1;
		com_Column1.AllowSizing(false);
		com_Column1.Width(48);
		com_Column1.FormatColumn("(((0 := (1 index ``)) mod 3) case ( default: ``; 0 : `<r><fgcolor=B0B0B0>`; 1: ``; 2 : `<c><fgcolor=808080>` )) + str(=:0)");
		com_Column1.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1));
		com_Column1.SortType(5/*SortUserData*/);
		com_Column1.Position(0);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.AddItem("Item 1");
		com_Items.AddItem("Item 2");
		com_Items.AddItem("Item 3");
		com_Items.AddItem("Item 4");
		com_Items.AddItem("Item 5");
		com_Items.AddItem("Item 6");
		com_Items.AddItem("Item 7");
		com_Items.AddItem("Item 8");
		com_Items.AddItem("Item 9");
		com_Items.AddItem("Item 10");
	exgrid1.EndUpdate();
}
966
How do I sort the index column as numeric (Method 2)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void onEvent_AddItem(int   _Item)
{
	COM com_Items;
	anytype var_Items;
	;
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.CellSortData(_Item,COMVariant::createFromInt(1),COMVariant::createFromStr(com_Items.CellCaption(_Item,COMVariant::createFromInt(1))));
}

public void init()
{
	COM com_Column,com_Column1,com_Items;
	anytype var_Column,var_Column1,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.DrawGridLines(-1/*exAllLines*/);
	exgrid1.ColumnAutoResize(true);
	exgrid1.ShowFocusRect(false);
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("Next")); com_Column = var_Column;
		com_Column.Def(48/*exCellPaddingLeft*/,COMVariant::createFromInt(4));
		com_Column.Def(52/*exHeaderPaddingLeft*/,COMVariant::createFromInt(4));
	var_Column1 = COM::createFromVariant(exgrid1.Columns().Add("Index")); com_Column1 = var_Column1;
		com_Column1.AllowSizing(false);
		com_Column1.Width(48);
		com_Column1.FormatColumn("(((0 := (1 index ``)) mod 3) case ( default: ``; 0 : `<r><fgcolor=B0B0B0>`; 1: ``; 2 : `<c><fgcolor=808080>` )) + str(=:0)");
		com_Column1.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1));
		com_Column1.SortType(6/*SortCellData*/);
		com_Column1.Position(0);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.AddItem("Item 1");
		com_Items.AddItem("Item 2");
		com_Items.AddItem("Item 3");
		com_Items.AddItem("Item 4");
		com_Items.AddItem("Item 5");
		com_Items.AddItem("Item 6");
		com_Items.AddItem("Item 7");
		com_Items.AddItem("Item 8");
		com_Items.AddItem("Item 9");
		com_Items.AddItem("Item 10");
	exgrid1.EndUpdate();
}
965
How do I sort the index column as numeric (Method 1)

public void init()
{
	COM com_Column,com_Column1,com_Items;
	anytype var_Column,var_Column1,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("Sort Index As String (Default)")); com_Column = var_Column;
		com_Column.FormatColumn("1 index ``");
	var_Column1 = COM::createFromVariant(exgrid1.Columns().Add("Sort Index As Numeric")); com_Column1 = var_Column1;
		com_Column1.ComputedField("%C0");
		com_Column1.SortType(1/*SortNumeric*/);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.AddItem("");
		com_Items.AddItem("");
		com_Items.AddItem("");
		com_Items.AddItem("");
		com_Items.AddItem("");
		com_Items.AddItem("");
		com_Items.AddItem("");
		com_Items.AddItem("");
		com_Items.AddItem("");
		com_Items.AddItem("");
	exgrid1.EndUpdate();
}
964
How can I put icons/images into buttons

public void init()
{
	COM com_Column,com_Items;
	anytype var_Column,var_Items;
	str var_s;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ColumnAutoResize(true);
	var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql";
	var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0";
	var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN";
	var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=";
	exgrid1.Images(COMVariant::createFromStr(var_s));
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("C+B")); com_Column = var_Column;
		com_Column.AllowSizing(false);
		com_Column.Width(48);
		com_Column.FormatColumn("` <img>` + ( 1 + (1 index ``) mod 3 ) + `</img> `");
		com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1));
		com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true));
		com_Column.Def(2/*exCellHasButton*/,COMVariant::createFromBoolean(true));
		com_Column.Def(3/*exCellButtonAutoWidth*/,COMVariant::createFromBoolean(true));
	exgrid1.Columns().Add("");
	exgrid1.DrawGridLines(2/*exVLines*/);
	exgrid1.DefaultItemHeight(20);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.AddItem("");
		com_Items.AddItem("");
		com_Items.AddItem("");
		com_Items.AddItem("");
		com_Items.AddItem("");
		com_Items.AddItem("");
		com_Items.AddItem("");
		com_Items.AddItem("");
	exgrid1.EndUpdate();
}
963
Is it possible to have a CheckBox and Button TOGETHER on all cells in a column

// ButtonClick event - Occurs when user clicks on the cell's button.
void onEvent_ButtonClick(int   _Item,int   _ColIndex,COMVariant   _Key)
{
	;
	print( "ButtonClick" );
	print( _Item );
	print( _Key );
}

// CellStateChanged event - Fired after cell's state has been changed.
void onEvent_CellStateChanged(int   _Item,int   _ColIndex)
{
	;
	print( "CellStateChanged" );
	print( _Item );
}

public void init()
{
	COM com_Column,com_Column1,com_Items;
	anytype var_Column,var_Column1,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ColumnAutoResize(true);
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("")); com_Column = var_Column;
		com_Column.AllowSizing(false);
		com_Column.Width(32);
		com_Column.FormatColumn("1 index ``");
	var_Column1 = COM::createFromVariant(exgrid1.Columns().Add("Def")); com_Column1 = var_Column1;
		com_Column1.AllowSizing(false);
		com_Column1.Width(48);
		com_Column1.FormatColumn("`     `");
		com_Column1.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true));
		com_Column1.Def(2/*exCellHasButton*/,COMVariant::createFromBoolean(true));
		com_Column1.Def(3/*exCellButtonAutoWidth*/,COMVariant::createFromBoolean(true));
	exgrid1.Columns().Add("");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.AddItem("");
		com_Items.AddItem("");
		com_Items.AddItem("");
		com_Items.AddItem("");
		com_Items.AddItem("");
		com_Items.AddItem("");
		com_Items.AddItem("");
		com_Items.AddItem("");
	exgrid1.EndUpdate();
}
962
I have columns that look up the same data. (e.g. different contact) so both could / should use the same editor. Is this possible, to use other column's editor

public void init()
{
	COM com_Column,com_Columns,com_Editor,com_Editor1,com_Items;
	anytype var_Column,var_Columns,var_Editor,var_Editor1,var_Items;
	int h;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.SelBackColor(exgrid1.BackColor());
	exgrid1.SelForeColor(exgrid1.ForeColor());
	var_Columns = exgrid1.Columns(); com_Columns = var_Columns;
		var_Column = COM::createFromVariant(com_Columns.Add("Pos")); com_Column = var_Column;
			com_Column.Width(32);
			com_Column.AllowSizing(false);
			com_Column.FormatColumn("1 index ``");
		var_Editor = com_Columns.Add("C1").Editor(); com_Editor = var_Editor;
			com_Editor.EditType(17/*ColorListType*/);
			com_Editor.ClearItems();
			com_Editor.AddItem(255,"Red Color");
			com_Editor.AddItem(16711680,"Blue Color");
			com_Editor.AddItem(65280,"Green Color");
		var_Editor1 = COM::createFromObject(COM::createFromVariant(com_Columns.Add("C2"))).Editor(); com_Editor1 = var_Editor1;
		com_Editor1.EditType(268435457/*CloneType | EditType*/);
		var_Editor1 = COM::createFromObject(COM::createFromVariant(com_Columns.Add("C3"))).Editor(); com_Editor1 = var_Editor1;
		com_Editor1.EditType(268435457/*CloneType | EditType*/);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h = com_Items.AddItem("");
		com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromInt(16711680));
		com_Items.CellValue(h,COMVariant::createFromInt(2),COMVariant::createFromInt(65280));
		com_Items.CellValue(h,COMVariant::createFromInt(3),COMVariant::createFromInt(255));
		h = com_Items.AddItem("");
		com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromInt(255));
		com_Items.CellValue(h,COMVariant::createFromInt(2),COMVariant::createFromInt(16711680));
		com_Items.CellValue(h,COMVariant::createFromInt(3),COMVariant::createFromInt(65280));
	exgrid1.EndUpdate();
}
961
Is there an easy way to get an effect like in a Microsoft Access / SQL-Server Table view, where you can scroll-up till the last row containing data is displayed as top-row

public void init()
{
	COM com_rs;
	anytype rs;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.HasLines(0/*exNoLine*/);
	exgrid1.ColumnAutoResize(false);
	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs;
		rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exgrid1.DataSource(rs);
	exgrid1.ScrollBars(2051/*exVScrollEmptySpace | exBoth*/);
	exgrid1.ScrollPos(true,exgrid1.Items().ItemCount());
	exgrid1.EndUpdate();
}
960
Does filtering work with umlauts / accents characters
public void init()
{
	COM com_Column,com_Column1,com_Items;
	anytype var_Column,var_Column1,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("Names")); com_Column = var_Column;
		com_Column.DisplayFilterButton(true);
		com_Column.FilterType(3/*exPattern*/);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.AddItem("Mantel");
		com_Items.AddItem("Mechanik");
		com_Items.AddItem("Motor");
		com_Items.AddItem("Murks");
		com_Items.AddItem("Märchen");
		com_Items.AddItem("Möhren");
		com_Items.AddItem("Mühle");
		com_Items.AddItem("Sérigraphie");
	var_Column1 = COM::createFromObject(exgrid1.Columns()).Item(COMVariant::createFromInt(0)); com_Column1 = var_Column1;
	com_Column1.Filter("*ä*");
	exgrid1.ApplyFilter();
	exgrid1.EndUpdate();
}
959
How FullPath method works

public void init()
{
	COM com_Items;
	anytype var_Items;
	int h;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.LinesAtRoot(-1/*exLinesAtRoot*/);
	exgrid1.Columns().Add("C1");
	exgrid1.Columns().Add("C2");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h = com_Items.AddItem("Root");
		com_Items.CellValue(h,COMVariant::createFromInt(1),"A");
		com_Items.CellValue(com_Items.InsertItem(h,,"Child 1"),COMVariant::createFromInt(1),"B");
		com_Items.CellValue(com_Items.InsertItem(h,,"Child 2"),COMVariant::createFromInt(1),"C");
		com_Items.ExpandItem(h,true);
	exgrid1.SearchColumnIndex(1);
	print( exgrid1.SearchColumnIndex() );
	print( .FullPath(exgrid1.Items().ItemByIndex(2)) );
	exgrid1.SearchColumnIndex(0);
	print( exgrid1.SearchColumnIndex() );
	print( .FullPath(exgrid1.Items().ItemByIndex(2)) );
	exgrid1.EndUpdate();
}
958
Can I set the search box / filterbarprompt to invisible, so I can use my own input and *string* via VBA
public void init()
{
	COM com_Columns,com_Items;
	anytype var_Columns,var_Items;
	int h0;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ColumnAutoResize(true);
	exgrid1.ContinueColumnScroll(0);
	exgrid1.MarkSearchColumn(false);
	exgrid1.SearchColumnIndex(1);
	exgrid1.FilterBarHeight(0);
	exgrid1.FilterBarPromptVisible(1/*exFilterBarPromptVisible*/);
	var_Columns = exgrid1.Columns(); com_Columns = var_Columns;
		COM::createFromVariant(com_Columns.Add("Name")).Width(96);
		COM::createFromVariant(com_Columns.Add("Title")).Width(96);
		com_Columns.Add("City");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h0 = com_Items.AddItem("Nancy Davolio");
		com_Items.CellValue(h0,COMVariant::createFromInt(1),"Sales Representative");
		com_Items.CellValue(h0,COMVariant::createFromInt(2),"Seattle");
		h0 = com_Items.AddItem("Andrew Fuller");
		com_Items.CellValue(h0,COMVariant::createFromInt(1),"Vice President, Sales");
		com_Items.CellValue(h0,COMVariant::createFromInt(2),"Tacoma");
		com_Items.SelectItem(h0,true);
		h0 = com_Items.AddItem("Janet Leverling");
		com_Items.CellValue(h0,COMVariant::createFromInt(1),"Sales Representative");
		com_Items.CellValue(h0,COMVariant::createFromInt(2),"Kirkland");
		h0 = com_Items.AddItem("Margaret Peacock");
		com_Items.CellValue(h0,COMVariant::createFromInt(1),"Sales Representative");
		com_Items.CellValue(h0,COMVariant::createFromInt(2),"Redmond");
		h0 = com_Items.AddItem("Steven Buchanan");
		com_Items.CellValue(h0,COMVariant::createFromInt(1),"Sales Manager");
		com_Items.CellValue(h0,COMVariant::createFromInt(2),"London");
		h0 = com_Items.AddItem("Michael Suyama");
		com_Items.CellValue(h0,COMVariant::createFromInt(1),"Sales Representative");
		com_Items.CellValue(h0,COMVariant::createFromInt(2),"London");
		h0 = com_Items.AddItem("Robert King");
		com_Items.CellValue(h0,COMVariant::createFromInt(1),"Sales Representative");
		com_Items.CellValue(h0,COMVariant::createFromInt(2),"London");
		h0 = com_Items.AddItem("Laura Callahan");
		com_Items.CellValue(h0,COMVariant::createFromInt(1),"Inside Sales Coordinator");
		com_Items.CellValue(h0,COMVariant::createFromInt(2),"Seattle");
		h0 = com_Items.AddItem("Anne Dodsworth");
		com_Items.CellValue(h0,COMVariant::createFromInt(1),"Sales Representative");
		com_Items.CellValue(h0,COMVariant::createFromInt(2),"London");
	exgrid1.FilterBarPromptPattern("London");
	exgrid1.EndUpdate();
}
957
How to load a hierarchy using the control's DataSource property (Parent-ID-Relation)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void onEvent_AddItem(int   _Item)
{
	COM com_Items;
	anytype var_Items;
	;
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.SetParent(_Item,com_Items.FindItem(com_Items.CellValue(_Item,"ReportsTo"),"EmployeeID"));
}

public void init()
{
	COM com_Items,com_rs;
	anytype rs,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.LinesAtRoot(-1/*exLinesAtRoot*/);
	exgrid1.ColumnAutoResize(false);
	exgrid1.ContinueColumnScroll(false);
	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs;
		rs.Open("SELECT * FROM Employees ORDER BY ReportsTo","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exgrid1.DataSource(rs);
	exgrid1.Items().ExpandItem(0,true);
	exgrid1.EndUpdate();
}
956
Is it possible to select the entire row/line, when user clicks the first column, and select individually the rest of cells, while user clicks any other column

// MouseDown event - Occurs when the user presses a mouse button.
void onEvent_MouseDown(int   _Button,int   _Shift,int   _X,int   _Y)
{
	int i;
	;
	i = exgrid1.ItemFromPoint(-1,-1,c,hit);
	exgrid1.FullRowSelect(exgrid1.Columns().Item(c).Data());
}

public void init()
{
	COM com_Column,com_rs;
	anytype rs,var_Column;
	int i;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.HeaderHeight(22);
	exgrid1.HeaderAppearance(1/*Flat*/);
	exgrid1.BackColorLock(WinApi::RGB2int(240,240,240));
	exgrid1.BackColorHeader(exgrid1.BackColorLock());
	exgrid1.HasLines(0/*exNoLine*/);
	exgrid1.ColumnAutoResize(false);
	exgrid1.SortBarVisible(false);
	exgrid1.AllowGroupBy(true);
	exgrid1.ReadOnly(-1/*exReadOnly*/);
	exgrid1.ShowFocusRect(false);
	exgrid1.CountLockedColumns(1);
	exgrid1.AutoDrag(16/*exAutoDragScroll*/);
	exgrid1.SingleSort(false);
	exgrid1.ColumnsAllowSizing(true);
	exgrid1.DrawGridLines(-1/*exAllLines*/);
	exgrid1.GridLineStyle(48/*exGridLinesSolid*/);
	exgrid1.GridLineColor(WinApi::RGB2int(220,220,220));
	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs;
		rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exgrid1.DataSource(rs);
	var_Column = COM::createFromObject(exgrid1.Columns()).Item(COMVariant::createFromInt(0)); com_Column = var_Column;
	com_Column.Data(COMVariant::createFromInt(-1));
	exgrid1.Layout("singlesort=\"C5:1\";multiplesort=\" C1:2\"");
	exgrid1.EndUpdate();
}
955
The user are not able to size the columns at runtime when using HeaderAppearance property on zero
public void init()
{
	str var_s;
	;

	super();

	var_s = "gBFLBCJwBAEHhEJAAEhABJEIQAAYAQGKIYBkAKBQAGaAoDDcMQ5QwAAyDGKEEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQiiCYsS5GQBSFDcOwHGyQZonKK3Lh";
	var_s = var_s + "GCYBgIA=";
	exgrid1.VisualAppearance().Add(1,COMVariant::createFromStr(var_s));
	exgrid1.HeaderAppearance(16777216);
	exgrid1.Columns().Add(1);
	exgrid1.Columns().Add(2);
	exgrid1.Columns().Add(3);
}
954
Is it possible to embed the exGauge into the exGrid control

// ItemOleEvent event - Fired when an ActiveX control hosted by an item has fired an event.
void onEvent_ItemOleEvent(int   _Item,COM   _Ev)
{
	COM com_Gauge,com_Layer;
	COMVariant v;
	anytype var_Gauge,var_Layer;
	;
	// Add 'ExGauge 1.0 Control Library(ExGauge.dll)' reference to your project.
	var_Gauge = COM::createFromVariant(exgrid1.Items().ItemObject(exgrid1.Items().ItemByIndex(2))); com_Gauge = var_Gauge;
		v = com_Gauge.FormatABC("date(`now`)");
		var_Layer = COM::createFromObject(com_Gauge.Layers()).Item("sec"); com_Layer = var_Layer;
		com_Layer.Value(v);
		var_Layer = COM::createFromObject(com_Gauge.Layers()).Item("min"); com_Layer = var_Layer;
		com_Layer.Value(v);
		var_Layer = COM::createFromObject(com_Gauge.Layers()).Item("hour"); com_Layer = var_Layer;
		com_Layer.Value(v);
}

// MouseMove event - Occurs when the user moves the mouse.
void onEvent_MouseMove(int   _Button,int   _Shift,int   _X,int   _Y)
{
	COM com_Gauge;
	anytype var_Gauge;
	;
	var_Gauge = COM::createFromVariant(exgrid1.Items().ItemObject(exgrid1.Items().ItemByIndex(2))); com_Gauge = var_Gauge;
		com_Gauge.TimerInterval(1000);
}

public void init()
{
	COM com_Background,com_Gauge,com_Items,com_Layer,com_Layer1,com_Layer2,com_Layer3,com_Layer4,com_Layers,com_Picture;
	COMVariant v;
	anytype var_Background,var_Gauge,var_Items,var_Layer,var_Layer1,var_Layer2,var_Layer3,var_Layer4,var_Layers,var_Picture;
	int h;
	str var_s,var_s1;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ScrollBySingleLine(true);
	exgrid1.LinesAtRoot(-1/*exLinesAtRoot*/);
	exgrid1.HasLines(2/*exThinLine*/);
	exgrid1.ScrollBySingleLine(true);
	exgrid1.Columns().Add("Default");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h = com_Items.AddItem("Normal Item");
		h = com_Items.AddItem("Gauge-Clock Inside");
		com_Items.ExpandItem(h,true);
		h = com_Items.InsertControlItem(h,"Exontrol.Gauge");
		com_Items.ItemHeight(h,256);
		var_Gauge = COM::createFromVariant(com_Items.ItemObject(h)); com_Gauge = var_Gauge;
			com_Gauge.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Clock");
			com_Gauge.DefaultLayer(185/*exDefLayerRotateType*/,COMVariant::createFromInt(2));
			var_Layers = COM::createFromObject(com_Gauge.Layers()); com_Layers = var_Layers;
			com_Layers.Count(4);
			var_Layer = COM::createFromObject(com_Gauge.Layers()).Item(COMVariant::createFromInt(0)); com_Layer = var_Layer;
				var_Background = COM::createFromObject(com_Layer.Background()); com_Background = var_Background;
				var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
				com_Picture.Name("vista_clock.png");
			var_Layer1 = COM::createFromObject(com_Gauge.Layers()).Item(COMVariant::createFromInt(1)); com_Layer1 = var_Layer1;
				com_Layer1.Position(3);
				com_Layer1.Key("sec");
				com_Layer1.OnDrag(2/*exDoRotate*/);
				com_Layer1.Selectable(false);
				var_Background = COM::createFromObject(com_Layer1.Background()); com_Background = var_Background;
				var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
				com_Picture.Name("second-hand.png");
				var_s = "((2:=(((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - f";
				var_s = var_s + "loor(=:1)) * 60 )) - floor(=:2) ) * 360";
				com_Layer1.ValueToRotateAngle(var_s);
				com_Layer1.RotateAngleToValue("value / 360 / 24 / 60");
			var_Layer2 = COM::createFromObject(com_Gauge.Layers()).Item(COMVariant::createFromInt(2)); com_Layer2 = var_Layer2;
				com_Layer2.Position(2);
				com_Layer2.Key("min");
				com_Layer2.OnDrag(2/*exDoRotate*/);
				com_Layer2.Selectable(false);
				var_Background = COM::createFromObject(com_Layer2.Background()); com_Background = var_Background;
				var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
				com_Picture.Name("Minute.png");
				var_s1 = "((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=";
				var_s1 = var_s1 + ":1)) * 360";
				com_Layer2.ValueToRotateAngle(var_s1);
				com_Layer2.RotateAngleToValue("value / 360 / 24 / 60");
			var_Layer3 = COM::createFromObject(com_Gauge.Layers()).Item(COMVariant::createFromInt(3)); com_Layer3 = var_Layer3;
				com_Layer3.Position(1);
				com_Layer3.Key("hour");
				com_Layer3.OnDrag(2/*exDoRotate*/);
				var_Background = COM::createFromObject(com_Layer3.Background()); com_Background = var_Background;
				var_Picture = COM::createFromObject(com_Background).Picture(); com_Picture = var_Picture;
				com_Picture.Name("Hour.png");
				com_Layer3.ValueToRotateAngle("2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )");
				com_Layer3.RotateAngleToValue("value / 360 * 0.5");
			v = com_Gauge.FormatABC("date(`now`)");
			var_Layer4 = COM::createFromObject(com_Gauge.Layers()).Item("sec"); com_Layer4 = var_Layer4;
			com_Layer4.Value(v);
			var_Layer4 = COM::createFromObject(com_Gauge.Layers()).Item("min"); com_Layer4 = var_Layer4;
			com_Layer4.Value(v);
			var_Layer4 = COM::createFromObject(com_Gauge.Layers()).Item("hour"); com_Layer4 = var_Layer4;
			com_Layer4.Value(v);
		h = com_Items.AddItem("Normal Item");
	exgrid1.EndUpdate();
}
953
What's the difference between merge cells and divider item

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void onEvent_AddItem(int   _Item)
{
	COM com_Items;
	anytype var_Items;
	;
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.CellBackColor(_Item,COMVariant::createFromInt(0),WinApi::RGB2int(240,240,240));
		com_Items.ItemHasChildren(_Item,true);
}

public void init()
{
	COM com_Items;
	anytype var_Items;
	int h;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.TreeColumnIndex(0);
	exgrid1.LinesAtRoot(-1/*exLinesAtRoot*/);
	exgrid1.DrawGridLines(-1/*exAllLines*/);
	COM::createFromVariant(exgrid1.Columns().Add("C1")).FormatColumn("1 index `A-Z`");
	COM::createFromVariant(exgrid1.Columns().Add("C2")).FormatColumn("1 index ``");
	COM::createFromVariant(exgrid1.Columns().Add("C3")).FormatColumn("1 index ``");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.AddItem();
		com_Items.AddItem();
		h = com_Items.AddItem();
		com_Items.CellMerge(h,COMVariant::createFromInt(0),COMVariant::createFromInt(1));
		com_Items.FormatCell(h,COMVariant::createFromInt(0),"`merge cells`");
		com_Items.CellHAlignment(h,COMVariant::createFromInt(0),1/*CenterAlignment*/);
		h = com_Items.AddItem();
		com_Items.ItemDivider(h,0);
		com_Items.CellHAlignment(h,COMVariant::createFromInt(0),1/*CenterAlignment*/);
		com_Items.FormatCell(h,COMVariant::createFromInt(0),"`item divider`");
		com_Items.AddItem();
		com_Items.AddItem();
	exgrid1.EndUpdate();
}
952
is it possible to resize a column with the mouse without changing the width of the next column

public void init()
{
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ColumnAutoResize(false);
	COM::createFromVariant(exgrid1.Columns().Add("Column 1")).Width(256);
	COM::createFromVariant(exgrid1.Columns().Add("Column 2")).Width(512);
	exgrid1.DrawGridLines(-1/*exAllLines*/);
	exgrid1.EndUpdate();
}
951
How do I ensure that the newly item fits the control's client area

// ButtonClick event - Occurs when user clicks on the cell's button.
void onEvent_ButtonClick(int   _Item,int   _ColIndex,COMVariant   _Key)
{
	COM com_Items;
	anytype var_Items;
	int h;
	;
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h = com_Items.AddItem("");
		com_Items.SelectItem(h,true);
		com_Items.EnsureVisibleItem(h);
	exgrid1.FocusColumnIndex(0);
}

public void init()
{
	COM com_Column,com_Items;
	anytype var_Column,var_Items;
	int h;
	;

	super();

	exgrid1.BeginUpdate();
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("")); com_Column = var_Column;
		com_Column.AllowSizing(false);
		com_Column.AllowDragging(false);
		com_Column.AllowSort(false);
		com_Column.Width(24);
		com_Column.Def(2/*exCellHasButton*/,COMVariant::createFromBoolean(true));
	COM::createFromVariant(exgrid1.Columns().Add("Position")).FormatColumn("1 apos `A-Z`");
	exgrid1.CountLockedColumns(1);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.AddItem("");
		com_Items.AddItem("");
		com_Items.AddItem("");
	exgrid1.EndUpdate();
}
950
How do I find the predefined string for giving value, or giving identifier for specified predefined caption of editor

// Change event - Occurs when the user changes the cell's content.
void onEvent_Change(int   _Item,int   _ColIndex,COMVariant /*variant*/   _NewValue)
{
	;
	print( "FindItem(numeric) is " );
	print( _NewValue );
	print( exgrid1.Columns().Item(COMVariant::createFromInt(0)).Editor().FindItem(_NewValue) );
}

public void init()
{
	COM com_Column,com_Column1,com_Column2,com_Editor,com_Items;
	anytype var_Column,var_Column1,var_Column2,var_Editor,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("DropDownList")); com_Column = var_Column;
		var_Editor = com_Column.Editor(); com_Editor = var_Editor;
			com_Editor.EditType(3/*DropDownListType*/);
			com_Editor.AddItem(1,"Ken Robinson");
			com_Editor.AddItem(2,"Dave Nichols");
			com_Editor.AddItem(3,"Zane Thomas");
			com_Editor.AddItem(4,"James Shields");
	var_Column1 = COM::createFromVariant(exgrid1.Columns().Add("CellValue")); com_Column1 = var_Column1;
		com_Column1.FormatColumn("%0");
		com_Column1.Def(4/*exCellBackColor*/,COMVariant::createFromInt(15790320));
		com_Column1.Def(7/*exHeaderBackColor*/,com_Column1.Def(4/*exCellBackColor*/));
	var_Column2 = COM::createFromVariant(exgrid1.Columns().Add("CellCaption")); com_Column2 = var_Column2;
		com_Column2.FormatColumn("%C0");
		com_Column2.Def(4/*exCellBackColor*/,COMVariant::createFromInt(15790320));
		com_Column2.Def(7/*exHeaderBackColor*/,com_Column2.Def(4/*exCellBackColor*/));
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.AddItem(COMVariant::createFromInt(1));
		com_Items.AddItem(exgrid1.Columns().Item(COMVariant::createFromInt(0)).Editor().FindItem("Zane Thomas"));
		com_Items.AddItem(COMVariant::createFromInt(2));
	exgrid1.EndUpdate();
}
949
How can I align captions of items with checkbox, with items with no checkbox

public void init()
{
	COM com_Items;
	anytype var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.Columns().Add("Default");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.CellImages(com_Items.AddItem(COMVariant::createFromInt(0)),COMVariant::createFromInt(0),"1");
		com_Items.CellHasCheckBox(com_Items.AddItem(COMVariant::createFromInt(1)),COMVariant::createFromInt(0),true);
		com_Items.CellImages(com_Items.AddItem(COMVariant::createFromInt(2)),COMVariant::createFromInt(0),"1");
	exgrid1.EndUpdate();
}
948
How can I prevent sorting a column

public void init()
{
	COM com_Column,com_Items;
	anytype var_Column,var_Items;
	int h;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.LinesAtRoot(-1/*exLinesAtRoot*/);
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("Default")); com_Column = var_Column;
		com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true));
		com_Column.PartialCheck(true);
		com_Column.AllowSort(false);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h = com_Items.AddItem("Root");
		com_Items.InsertItem(h,,"Child 1");
		com_Items.InsertItem(h,,"Child 2");
		com_Items.ExpandItem(h,true);
	exgrid1.EndUpdate();
}
947
Is there a possibility to group without moving and showing the column to the SortBar

public void init()
{
	COM com_rs;
	anytype rs;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.HasLines(0/*exNoLine*/);
	exgrid1.ColumnAutoResize(false);
	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs;
		rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exgrid1.DataSource(rs);
	exgrid1.SingleSort(false);
	exgrid1.SortBarVisible(false);
	exgrid1.AllowGroupBy(true);
	exgrid1.Layout("singlesort=\"C5:1\";multiplesort=\" C1:2\"");
	exgrid1.EndUpdate();
}
946
How can I show each group header ( not-subroup ), with a different background color, while alternate background colors for inside items

// LayoutChanged event - Occurs when column's position or column's size is changed.
void onEvent_LayoutChanged()
{
	;
	exgrid1.Refresh();
}

public void init()
{
	COM com_Column,com_Column1,com_ConditionalFormat,com_rs;
	anytype rs,var_Column,var_Column1,var_ConditionalFormat;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.HasLines(0/*exNoLine*/);
	exgrid1.ColumnAutoResize(false);
	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs;
		rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exgrid1.DataSource(rs);
	exgrid1.SingleSort(false);
	exgrid1.SortBarVisible(true);
	exgrid1.AllowGroupBy(true);
	var_Column = COM::createFromObject(exgrid1.Columns()).Item(COMVariant::createFromInt(1)); com_Column = var_Column;
	com_Column.SortOrder(true);
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("Position")); com_Column = var_Column;
		com_Column.FormatColumn("(0:= (1 rpos '')) right ( ( 1:= ( =:0 rfind `.` ) ) != -1 ? =:1 : len(=:0))");
		com_Column.Visible(false);
	var_Column1 = COM::createFromVariant(exgrid1.Columns().Add("Position")); com_Column1 = var_Column1;
		com_Column1.FormatColumn("(1 rpos '') contains '.'");
		com_Column1.Visible(false);
	var_ConditionalFormat = COM::createFromObject(exgrid1.ConditionalFormats()).Add("(%C13 mod 2) != 0"); com_ConditionalFormat = var_ConditionalFormat;
	com_ConditionalFormat.BackColor(WinApi::RGB2int(240,240,240));
	var_ConditionalFormat = COM::createFromObject(exgrid1.ConditionalFormats()).Add("%C14 = 0"); com_ConditionalFormat = var_ConditionalFormat;
	com_ConditionalFormat.BackColor(WinApi::RGB2int(190,190,190));
	exgrid1.EndUpdate();
}
945
What is the difference between %0 and %C0, when using in expressions ( format, conditional format, computed fields, and so on )

public void init()
{
	COM com_Column,com_Column1,com_Editor,com_Items;
	anytype var_Column,var_Column1,var_Editor,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.HeaderAppearance(4/*Etched*/);
	exgrid1.HeaderHeight(24);
	exgrid1.ScrollBySingleLine(true);
	exgrid1.DrawGridLines(-2/*exRowLines*/);
	COM::createFromVariant(exgrid1.Columns().Add("Value")).Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1));
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("FormatColumn = `%0` ~ CellValue")); com_Column = var_Column;
		com_Column.FormatColumn("%0");
		com_Column.Def(16/*exCellSingleLine*/,COMVariant::createFromBoolean(false));
	var_Column1 = COM::createFromVariant(exgrid1.Columns().Add("FormatColumn = `%C0`~ CellCaption")); com_Column1 = var_Column1;
		com_Column1.FormatColumn("%C0");
		com_Column1.Def(16/*exCellSingleLine*/,COMVariant::createFromBoolean(false));
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.AddItem(COMVariant::createFromReal(1.1234));
		com_Items.CellValueFormat(com_Items.AddItem("<sha ;;0>This <fgcolor=FF0000>is a <s><b>HTM</fgcolor>L</b> text</s>."),COMVariant::createFromInt(0),1/*exHTML*/);
		var_Editor = com_Items.CellEditor(com_Items.AddItem(COMVariant::createFromInt(3))); com_Editor = var_Editor;
			com_Editor.EditType(6/*CheckListType*/);
			com_Editor.AddItem(1,"Border");
			com_Editor.AddItem(2,"Thick");
			com_Editor.AddItem(4,"Shadow");
		com_Items.FormatCell(com_Items.AddItem(COMVariant::createFromInt(10000)),COMVariant::createFromInt(0),"`<b>` + currency(value)");
	exgrid1.EndUpdate();
}
944
How can I alternate colors for each group header ( not-subroup ), with a different background color, while items of the same group showing with a different color

// LayoutChanged event - Occurs when column's position or column's size is changed.
void onEvent_LayoutChanged()
{
	;
	exgrid1.Refresh();
}

public void init()
{
	COM com_Column,com_Column1,com_ConditionalFormat,com_rs;
	anytype rs,var_Column,var_Column1,var_ConditionalFormat;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.HasLines(0/*exNoLine*/);
	exgrid1.ColumnAutoResize(false);
	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs;
		rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exgrid1.DataSource(rs);
	exgrid1.SingleSort(false);
	exgrid1.SortBarVisible(true);
	exgrid1.AllowGroupBy(true);
	var_Column = COM::createFromObject(exgrid1.Columns()).Item(COMVariant::createFromInt(1)); com_Column = var_Column;
	com_Column.SortOrder(true);
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("Position")); com_Column = var_Column;
		com_Column.FormatColumn("(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))");
		com_Column.Visible(false);
	var_Column1 = COM::createFromVariant(exgrid1.Columns().Add("Position")); com_Column1 = var_Column1;
		com_Column1.FormatColumn("(1 rpos '') contains '.'");
		com_Column1.Visible(false);
	var_ConditionalFormat = COM::createFromObject(exgrid1.ConditionalFormats()).Add("(%C13 mod 2) != 0"); com_ConditionalFormat = var_ConditionalFormat;
	com_ConditionalFormat.BackColor(WinApi::RGB2int(240,240,240));
	var_ConditionalFormat = COM::createFromObject(exgrid1.ConditionalFormats()).Add("%C14 = 0"); com_ConditionalFormat = var_ConditionalFormat;
	com_ConditionalFormat.BackColor(WinApi::RGB2int(190,190,190));
	exgrid1.EndUpdate();
}
943
How can I highlight each group header, with a different background color (method 2)

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void onEvent_AddGroupItem(int   _Item)
{
	;
	exgrid1.Items().ItemBackColor(_Item,WinApi::RGB2int(190,190,190));
}

public void init()
{
	COM com_Column,com_rs;
	anytype rs,var_Column;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.HasLines(0/*exNoLine*/);
	exgrid1.ColumnAutoResize(false);
	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs;
		rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exgrid1.DataSource(rs);
	exgrid1.SingleSort(false);
	exgrid1.SortBarVisible(true);
	exgrid1.AllowGroupBy(true);
	var_Column = COM::createFromObject(exgrid1.Columns()).Item(COMVariant::createFromInt(1)); com_Column = var_Column;
	com_Column.SortOrder(true);
	exgrid1.EndUpdate();
}
942
How can I highlight each group header ( not-subroup ), with a different background color (method 1)

// LayoutChanged event - Occurs when column's position or column's size is changed.
void onEvent_LayoutChanged()
{
	;
	exgrid1.Refresh();
}

public void init()
{
	COM com_Column,com_Column1,com_ConditionalFormat,com_rs;
	anytype rs,var_Column,var_Column1,var_ConditionalFormat;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.HasLines(0/*exNoLine*/);
	exgrid1.ColumnAutoResize(false);
	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs;
		rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exgrid1.DataSource(rs);
	exgrid1.SingleSort(false);
	exgrid1.SortBarVisible(true);
	exgrid1.AllowGroupBy(true);
	var_Column = COM::createFromObject(exgrid1.Columns()).Item(COMVariant::createFromInt(1)); com_Column = var_Column;
	com_Column.SortOrder(true);
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("Position")); com_Column = var_Column;
		com_Column.FormatColumn("(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))");
		com_Column.Visible(false);
	var_Column1 = COM::createFromVariant(exgrid1.Columns().Add("Position")); com_Column1 = var_Column1;
		com_Column1.FormatColumn("(1 rpos '') contains '.'");
		com_Column1.Visible(false);
	var_ConditionalFormat = COM::createFromObject(exgrid1.ConditionalFormats()).Add("%C14 = 0"); com_ConditionalFormat = var_ConditionalFormat;
	com_ConditionalFormat.BackColor(WinApi::RGB2int(190,190,190));
	exgrid1.EndUpdate();
}
941
The BackColorAlternate displays each second row with a different background color. Is it possible to apply a different background color, for each sub-tree, ConditionalFormats, Add

// LayoutChanged event - Occurs when column's position or column's size is changed.
void onEvent_LayoutChanged()
{
	;
	exgrid1.Refresh();
}

// Sort event - Fired when the control sorts a column.
void onEvent_Sort()
{
	;
	exgrid1.Refresh();
}

public void init()
{
	COM com_Column,com_Column1,com_Column2,com_ConditionalFormat,com_Items;
	anytype var_Column,var_Column1,var_Column2,var_ConditionalFormat,var_Items;
	int h;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.LinesAtRoot(-1/*exLinesAtRoot*/);
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("P1")); com_Column = var_Column;
		com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true));
		com_Column.PartialCheck(true);
	var_Column1 = COM::createFromVariant(exgrid1.Columns().Add("P2")); com_Column1 = var_Column1;
		com_Column1.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true));
		com_Column1.PartialCheck(true);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h = com_Items.AddItem("Root 1");
		com_Items.InsertItem(h,,"Child 1");
		com_Items.InsertItem(h,,"Child 2");
		com_Items.ExpandItem(h,true);
		h = com_Items.AddItem("Root 2");
		com_Items.InsertItem(h,,"Child 1");
		com_Items.InsertItem(h,,"Child 2");
		com_Items.ExpandItem(h,true);
		h = com_Items.AddItem("Root 2");
		com_Items.InsertItem(h,,"Child 1");
		com_Items.InsertItem(h,,"Child 2");
		com_Items.ExpandItem(h,true);
	var_Column2 = COM::createFromVariant(exgrid1.Columns().Add("Position")); com_Column2 = var_Column2;
		com_Column2.FormatColumn("(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))");
		com_Column2.Visible(false);
	var_ConditionalFormat = COM::createFromObject(exgrid1.ConditionalFormats()).Add("(%C2 mod 2) != 0"); com_ConditionalFormat = var_ConditionalFormat;
	com_ConditionalFormat.BackColor(WinApi::RGB2int(240,240,240));
	exgrid1.EndUpdate();
}
940
The BackColorAlternate displays each second row with a different background color. Is it possible to apply a different background color, for 2nd, 3rd, 4th, row, and so on

// LayoutChanged event - Occurs when column's position or column's size is changed.
void onEvent_LayoutChanged()
{
	;
	exgrid1.Refresh();
}

// Sort event - Fired when the control sorts a column.
void onEvent_Sort()
{
	;
	exgrid1.Refresh();
}

public void init()
{
	COM com_Column,com_ConditionalFormat,com_rs;
	anytype rs,var_Column,var_ConditionalFormat;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.HasLines(0/*exNoLine*/);
	exgrid1.ColumnAutoResize(false);
	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs;
		rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exgrid1.DataSource(rs);
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("Position")); com_Column = var_Column;
		com_Column.FormatColumn("1 apos ''");
		com_Column.Visible(false);
	var_ConditionalFormat = COM::createFromObject(exgrid1.ConditionalFormats()).Add("(%C13 mod 5) = 1"); com_ConditionalFormat = var_ConditionalFormat;
	com_ConditionalFormat.BackColor(WinApi::RGB2int(128,128,128));
	var_ConditionalFormat = COM::createFromObject(exgrid1.ConditionalFormats()).Add("(%C13 mod 5) = 2"); com_ConditionalFormat = var_ConditionalFormat;
	com_ConditionalFormat.BackColor(WinApi::RGB2int(164,164,164));
	var_ConditionalFormat = COM::createFromObject(exgrid1.ConditionalFormats()).Add("(%C13 mod 5) = 3"); com_ConditionalFormat = var_ConditionalFormat;
	com_ConditionalFormat.BackColor(WinApi::RGB2int(190,190,190));
	var_ConditionalFormat = COM::createFromObject(exgrid1.ConditionalFormats()).Add("(%C13 mod 5) = 4"); com_ConditionalFormat = var_ConditionalFormat;
	com_ConditionalFormat.BackColor(WinApi::RGB2int(240,240,240));
	exgrid1.EndUpdate();
}
939
The BackColorAlternate displays each second row with a different background color. The question I have it is possible to apply a different background color for 3rd, 4th, row, and so on

// LayoutChanged event - Occurs when column's position or column's size is changed.
void onEvent_LayoutChanged()
{
	;
	exgrid1.Refresh();
}

// Sort event - Fired when the control sorts a column.
void onEvent_Sort()
{
	;
	exgrid1.Refresh();
}

public void init()
{
	COM com_Column,com_ConditionalFormat,com_rs;
	anytype rs,var_Column,var_ConditionalFormat;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.HasLines(0/*exNoLine*/);
	exgrid1.ColumnAutoResize(false);
	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs;
		rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exgrid1.DataSource(rs);
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("Position")); com_Column = var_Column;
		com_Column.FormatColumn("1 apos ''");
		com_Column.Visible(false);
	var_ConditionalFormat = COM::createFromObject(exgrid1.ConditionalFormats()).Add("(%C13 mod 4) = 0"); com_ConditionalFormat = var_ConditionalFormat;
	com_ConditionalFormat.BackColor(WinApi::RGB2int(240,240,240));
	exgrid1.EndUpdate();
}
938
The BackColorAlternate looks fine for flat tables, but how about using it when displaying a hierarchy/tree, like grouping rows. The sample alternate colors for each group found

// LayoutChanged event - Occurs when column's position or column's size is changed.
void onEvent_LayoutChanged()
{
	;
	exgrid1.Refresh();
}

public void init()
{
	COM com_Column,com_ConditionalFormat,com_rs;
	anytype rs,var_Column,var_ConditionalFormat;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.HasLines(0/*exNoLine*/);
	exgrid1.ColumnAutoResize(false);
	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs;
		rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exgrid1.DataSource(rs);
	exgrid1.SingleSort(false);
	exgrid1.SortBarVisible(true);
	exgrid1.AllowGroupBy(true);
	var_Column = COM::createFromObject(exgrid1.Columns()).Item(COMVariant::createFromInt(1)); com_Column = var_Column;
	com_Column.SortOrder(true);
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("Position")); com_Column = var_Column;
		com_Column.FormatColumn("(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))");
		com_Column.Visible(false);
	var_ConditionalFormat = COM::createFromObject(exgrid1.ConditionalFormats()).Add("(%C13 mod 2) != 0"); com_ConditionalFormat = var_ConditionalFormat;
	com_ConditionalFormat.BackColor(WinApi::RGB2int(240,240,240));
	exgrid1.EndUpdate();
}
937
I need to display sub-totals in the grouping items. Is there any solution on this

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void onEvent_AddGroupItem(int   _Item)
{
	COM com_Items;
	anytype var_Items;
	;
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.ItemDivider(_Item,-1);
		com_Items.EnableItem(_Item,false);
		com_Items.CellValueFormat(_Item,exgrid1.TreeColumnIndex(),1/*exHTML*/);
		com_Items.FormatCell(_Item,exgrid1.TreeColumnIndex(),"%1");
		com_Items.CellValueFormat(_Item,"Freight",5/*exTotalField | exHTML*/);
		com_Items.CellValue(_Item,"Freight","sum(current,dir,%6)");
		com_Items.FormatCell(_Item,"Freight","`<b>` + currency(value)");
}

public void init()
{
	COM com_Column,com_Items,com_rs;
	anytype rs,var_Column,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.SelBackMode(1/*exTransparent*/);
	exgrid1.BackColorSortBar(WinApi::RGB2int(240,240,240));
	exgrid1.ColumnAutoResize(false);
	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs;
		rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exgrid1.DataSource(rs);
	exgrid1.SortBarVisible(true);
	exgrid1.SortBarCaption("Drag a <b>column</b> header here to group by that column.");
	exgrid1.AllowGroupBy(true);
	var_Column = COM::createFromObject(exgrid1.Columns()).Item(COMVariant::createFromInt(1)); com_Column = var_Column;
	com_Column.SortOrder(1/*SortAscending*/);
	exgrid1.LinesAtRoot(5/*exGroupLinesOutside*/);
	var_Column = COM::createFromObject(exgrid1.Columns()).Item("ShipVia"); com_Column = var_Column;
	com_Column.DisplayFilterButton(true);
	exgrid1.EndUpdate();
}
936
I use a subtotal in exTop-Item, after grouping the item shows 0. What is the solution

public void init()
{
	COM com_Column,com_Items,com_rs;
	anytype rs,var_Column,var_Items;
	int h;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ColumnAutoResize(false);
	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs;
		rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exgrid1.DataSource(rs);
	exgrid1.SingleSort(false);
	exgrid1.AllowGroupBy(true);
	exgrid1.SortBarVisible(true);
	exgrid1.BackColorSortBar(exgrid1.BackColor());
	var_Column = COM::createFromObject(exgrid1.Columns()).Item(COMVariant::createFromInt(5)); com_Column = var_Column;
	com_Column.SortOrder(1/*SortAscending*/);
	var_Column = COM::createFromObject(exgrid1.Columns()).Item(COMVariant::createFromInt(6)); com_Column = var_Column;
	com_Column.FormatColumn("currency(value)");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.LockedItemCount(0/*exTop*/,1);
		h = com_Items.LockedItem(0/*exTop*/,0);
		com_Items.ItemBackColor(h,WinApi::RGB2int(240,240,240));
		com_Items.CellBackColor(h,COMVariant::createFromInt(6),WinApi::RGB2int(190,190,190));
		com_Items.CellValue(h,COMVariant::createFromInt(6),"sum(all,rec,%6)");
		com_Items.CellValueFormat(h,COMVariant::createFromInt(6),4/*exTotalField*/);
	exgrid1.Refresh();
	exgrid1.EndUpdate();
}
935
I would like to avoid manual typing in the date-cell because user often type wrong things (no decimal points and so on) and so the todays-date is generated for the cell. What can be done

// KeyPress event - Occurs when the user presses and releases an ANSI key.
void onEvent_KeyPress(COMVariant /*short*/   _KeyAscii)
{
	;
	print( "if .Editying != 0 then" );
	print( exgrid1.Editing() );
	_KeyAscii = 0;
}

public void init()
{
	COM com_Column,com_Columns,com_Editor,com_Items;
	anytype var_Column,var_Columns,var_Editor,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ColumnAutoResize(false);
	var_Columns = exgrid1.Columns(); com_Columns = var_Columns;
		com_Columns.Add("Tasks");
		var_Column = COM::createFromVariant(com_Columns.Add("Date")); com_Column = var_Column;
			var_Editor = COM::createFromObject(com_Column.Editor()); com_Editor = var_Editor;
			com_Editor.EditType(7/*DateType*/);
			com_Column.Width(128);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.CellValue(com_Items.AddItem("Item 1"),COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("9/21/2006",213)));
		com_Items.CellValue(com_Items.AddItem("Item 2"),COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("12/22/2015",213)));
		com_Items.CellValue(com_Items.AddItem("Item 3"),COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("1/10/2015",213)));
	exgrid1.EndUpdate();
}
934
The control does not ensure the item to fit the control's client area once the user clicks the cell's button or check box. What can be done
// MouseDown event - Occurs when the user presses a mouse button.
void onEvent_MouseDown(int   _Button,int   _Shift,int   _X,int   _Y)
{
	// Items.EnsureVisibleItem(ItemFromPoint(-1,-1,c,hit))
	;
}

public void init()
{
	COM com_Column,com_Items;
	anytype var_Column,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.TreeColumnIndex(-1);
	exgrid1.SelForeColor(exgrid1.ForeColor());
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("Buttons")); com_Column = var_Column;
		com_Column.Alignment(1/*CenterAlignment*/);
		com_Column.Def(2/*exCellHasButton*/,COMVariant::createFromBoolean(true));
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.AddItem("Button A");
		com_Items.AddItem("Button B");
		com_Items.AddItem("Button C");
	exgrid1.EndUpdate();
}
933
How do you save the index number from a drop down to a database

public void init()
{
	COM com_Column,com_Editor,com_rs;
	anytype rs,var_Column,var_Editor;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ColumnAutoResize(false);
	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs;
		rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exgrid1.DataSource(rs);
	var_Column = COM::createFromObject(exgrid1.Columns()).Item("ShipVia"); com_Column = var_Column;
		com_Column.Def(4/*exCellBackColor*/,COMVariant::createFromInt(15790320));
		com_Column.Position(1);
		com_Column.Width(96);
		var_Editor = com_Column.Editor(); com_Editor = var_Editor;
			com_Editor.EditType(3/*DropDownListType*/);
			com_Editor.AddItem(1,"Speedy Express");
			com_Editor.AddItem(2,"United Package");
			com_Editor.AddItem(3,"Federal Shipping");
	exgrid1.EndUpdate();
}
932
Is there a way to set the column width and have it stay when refreshing using the data source

public void init()
{
	COM com_rs;
	anytype rs;
	str var_s;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ColumnAutoResize(false);
	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs;
		rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exgrid1.DataSource(rs);
	var_s = "gBjAAwAAuABmABpABsAB0ABlAByhoAPIAOEPAA9gYABoABQAgUEg0XN4AOcJicKkpujIAGMcj0gjcGk8QhkQgUOjUEjsfkMFAB2lEnhRihcYjUvnsykQAO8oMkTNEtGg";
	var_s = var_s + "AGUwn0uoEIhUMh0QiUOisXiE7rEyl8jAElokptYAllmpcCtMmjE3mU6jdzrUGoUKttGvFJs90oFPhVRh1Twg4wtaptco9fiMTsdIvcxw1Nkl2hUOlVwlsvnmayFAmtHn";
	var_s = var_s + "ETuWm0lAv+eAGCzFK10zp1QqVUAGOvkvuuSr0YsMUi2Y0tZ4FAztt0FvuNa23Kvt2m0YnMt5No6uxwOq0eP5cGxAAxQAxgAGwAqu/q1blHDsGW49lzPUq9qtko58r8Kr";
	var_s = var_s + "vc/LrPA7LWvw2ChpQ2j7Om7kBPK870hu+6ZQE4SJvmsT6u0x8BOa/iUP8jUANNATUrxAsKIFATvQU8DCL5B7dMWlr1u2gQZvgrsMMrDSyQ4vkcv02T+tEjUcyC1C7uw1";
	var_s = var_s + "kVABISgwSosXq1JLyRm9EaycqqDQuyjisu+0bvY5i3udEMjTIvkuQHFEmzHNkWymwcqtNNkIN2jUbMeGsdMm4j6R/AyZT7IcztC6M+r5Qs2yYvUx0ZOTZypBqBUZPEaM";
	var_s = var_s + "ax71y6+MeTBDdBoFTjjv2z80Oi9a+VJE9HSA01SUlBbw1Ww8sPSqtFNNCdOx3L9AuQx9eVLIlUJbCa+WHVrV0fYUEMBF06UqAFh0xLLCT7abHV7P8MuNQUnW3YlDuglr";
	var_s = var_s + "fNNcVlrzV6s3FWVKMfcVrPSq6rva0wcz8+Ue2/YK+XzQ0QUQlt83/JTr2ZdiZYBKNoTm2rH4ZedzSckqGDqAA2tEk7CSQmKEJKgWMY5CmQJlkaZYsAGMY0liFJYqKIDx";
	var_s = var_s + "hSpjCu0vUBQappOgSJZUhlBtTmyJIEqaBZVljRZe8yMZnoMl4SjQRI3qal3U7OjqPpOXNFmIAadCiHIkiDV6RjOla7puFKFnjK5/ta7Z6t6GIYkqEIQ1NmqWgIA=";
	exgrid1.Layout(var_s);
	exgrid1.EndUpdate();
}
931
Is it possible to decode/view the control's Layout property

public void init()
{
	COM com_Print;
	anytype var_Print;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.SingleSort(false);
	exgrid1.Columns().Add("C0");
	COM::createFromVariant(exgrid1.Columns().Add("C1")).SortOrder(1/*SortAscending*/);
	exgrid1.Columns().Add("C2");
	// Add 'exprint.dll(ExPrint.dll)' reference to your project.
	// Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project.
	var_Print = COM::createFromObject(new EXPRINTLib.exprint()); com_Print = var_Print;
		print( com_Print.Decode64TextW(exgrid1.Layout()) );
	exgrid1.EndUpdate();
}
930
How do I programmatically sort by multiple columns

public void init()
{
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.SingleSort(false);
	exgrid1.Columns().Add("C0");
	exgrid1.Columns().Add("C1");
	exgrid1.Columns().Add("C2");
	exgrid1.Layout("multiplesort=\"C2:1 C1:2 C0:2\"");
	exgrid1.EndUpdate();
}
929
Do you have any Fit-To-Page options when printing the control (W x T, Fit-To )

public void init()
{
	COM com_Print,com_rs;
	anytype rs,var_Print;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ColumnAutoResize(false);
	exgrid1.ContinueColumnScroll(false);
	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs;
		rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exgrid1.DataSource(rs);
	exgrid1.EndUpdate();
	// Add 'exprint.dll(ExPrint.dll)' reference to your project.
	// Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project.
	var_Print = COM::createFromObject(new EXPRINTLib.exprint()); com_Print = var_Print;
		com_Print.Options("FitToPage =2 x 1");
		com_Print.PrintExt(exgrid1);
		com_Print.Preview();
}
928
Do you have any Fit-To-Page options when printing the control ( x T, Fit-To Tall )

public void init()
{
	COM com_Print,com_rs;
	anytype rs,var_Print;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ColumnAutoResize(false);
	exgrid1.ContinueColumnScroll(false);
	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs;
		rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exgrid1.DataSource(rs);
	exgrid1.EndUpdate();
	// Add 'exprint.dll(ExPrint.dll)' reference to your project.
	// Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project.
	var_Print = COM::createFromObject(new EXPRINTLib.exprint()); com_Print = var_Print;
		com_Print.Options("FitToPage = x 2");
		com_Print.PrintExt(exgrid1);
		com_Print.Preview();
}
927
Do you have any Fit-To-Page options when printing the control ( W x, Fit-To Wide )

public void init()
{
	COM com_Print,com_rs;
	anytype rs,var_Print;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ColumnAutoResize(false);
	exgrid1.ContinueColumnScroll(false);
	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs;
		rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exgrid1.DataSource(rs);
	exgrid1.EndUpdate();
	// Add 'exprint.dll(ExPrint.dll)' reference to your project.
	// Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project.
	var_Print = COM::createFromObject(new EXPRINTLib.exprint()); com_Print = var_Print;
		com_Print.Options("FitToPage = 2 x");
		com_Print.PrintExt(exgrid1);
		com_Print.Preview();
}
926
Do you have any Fit-To-Page options when printing the control ( percent view, Adjust-To )

public void init()
{
	COM com_Print,com_rs;
	anytype rs,var_Print;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ColumnAutoResize(false);
	exgrid1.ContinueColumnScroll(false);
	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs;
		rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exgrid1.DataSource(rs);
	exgrid1.EndUpdate();
	// Add 'exprint.dll(ExPrint.dll)' reference to your project.
	// Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project.
	var_Print = COM::createFromObject(new EXPRINTLib.exprint()); com_Print = var_Print;
		com_Print.Options("FitToPage = 50%");
		com_Print.PrintExt(exgrid1);
		com_Print.Preview();
}
925
How can I get notified once the user expands a column

// LayoutChanged event - Occurs when column's position or column's size is changed.
void onEvent_LayoutChanged()
{
	;
	print( "Column-Expanded" );
	print( exgrid1.Columns().Item("C0").Expanded() );
}

public void init()
{
	COM com_Column,com_Columns,com_Items;
	anytype var_Column,var_Columns,var_Items;
	int h;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ShowFocusRect(false);
	exgrid1.ColumnAutoResize(false);
	exgrid1.DrawGridLines(-1/*exAllLines*/);
	exgrid1.BackColorLevelHeader(exgrid1.BackColor());
	var_Columns = exgrid1.Columns(); com_Columns = var_Columns;
		var_Column = COM::createFromVariant(com_Columns.Add("C0")); com_Column = var_Column;
			com_Column.ExpandColumns("0,1,2");
			com_Column.DisplayExpandButton(true);
		com_Columns.Add("C1");
		com_Columns.Add("C2");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h = com_Items.AddItem("Cell 0.0");
		com_Items.CellValue(h,COMVariant::createFromInt(1),"Cell 0.1");
		com_Items.CellValue(h,COMVariant::createFromInt(2),"Cell 0.2");
		h = com_Items.AddItem("Cell 1.0");
		com_Items.CellValue(h,COMVariant::createFromInt(1),"Cell 1.1");
		com_Items.CellValue(h,COMVariant::createFromInt(2),"Cell 1.2");
	exgrid1.EndUpdate();
}
924
I am using expandable headers, the question is how I can display the column itself, not just the child columns

public void init()
{
	COM com_Column,com_Columns,com_Items;
	anytype var_Column,var_Columns,var_Items;
	int h;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ColumnAutoResize(false);
	exgrid1.DrawGridLines(-1/*exAllLines*/);
	exgrid1.BackColorLevelHeader(exgrid1.BackColor());
	var_Columns = exgrid1.Columns(); com_Columns = var_Columns;
		var_Column = COM::createFromVariant(com_Columns.Add("C0")); com_Column = var_Column;
			com_Column.ExpandColumns("0,1,2");
			com_Column.DisplayExpandButton(true);
		com_Columns.Add("C1");
		com_Columns.Add("C2");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h = com_Items.AddItem("Cell 0.0");
		com_Items.CellValue(h,COMVariant::createFromInt(1),"Cell 0.1");
		com_Items.CellValue(h,COMVariant::createFromInt(2),"Cell 0.2");
		h = com_Items.AddItem("Cell 1.0");
		com_Items.CellValue(h,COMVariant::createFromInt(1),"Cell 1.1");
		com_Items.CellValue(h,COMVariant::createFromInt(2),"Cell 1.2");
	exgrid1.EndUpdate();
}
923
How do I layout expandable columns

public void init()
{
	COM com_Column,com_Column1,com_Column2,com_Column3,com_Columns;
	anytype var_Column,var_Column1,var_Column2,var_Column3,var_Columns;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ColumnAutoResize(false);
	exgrid1.DrawGridLines(-1/*exAllLines*/);
	exgrid1.BackColorLevelHeader(exgrid1.BackColor());
	var_Columns = exgrid1.Columns(); com_Columns = var_Columns;
		var_Column = COM::createFromVariant(com_Columns.Add("C0")); com_Column = var_Column;
			com_Column.ExpandColumns("1,2");
			com_Column.DisplayExpandButton(true);
		com_Columns.Add("C1");
		com_Columns.Add("C2");
		com_Columns.Add("C3");
		var_Column1 = COM::createFromVariant(com_Columns.Add("C4")); com_Column1 = var_Column1;
			com_Column1.ExpandColumns("5,6");
			com_Column1.DisplayExpandButton(true);
		com_Columns.Add("C5");
		var_Column2 = COM::createFromVariant(com_Columns.Add("C6")); com_Column2 = var_Column2;
			com_Column2.ExpandColumns("6,7");
			com_Column2.DisplayExpandButton(true);
		com_Columns.Add("C7");
	exgrid1.EndUpdate();
	var_Column3 = COM::createFromObject(exgrid1.Columns()).Item("C4"); com_Column3 = var_Column3;
	com_Column3.Expanded(false);
}
922
How do I make the control read-only (method 2)

// Edit event - Occurs just before editing the focused cell.
void onEvent_Edit(int   _Item,int   _ColIndex,COMVariant /*bool*/   _Cancel)
{
	;
	_Cancel = true;
}

public void init()
{
	COM com_Column,com_Editor,com_Editor1,com_Items;
	anytype var_Column,var_Editor,var_Editor1,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	var_Editor = COM::createFromVariant(exgrid1.Columns().Add("Editor")).Editor(); com_Editor = var_Editor;
		com_Editor.EditType(6/*CheckListType*/);
		com_Editor.AddItem(1,"One");
		com_Editor.AddItem(2,"Two");
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("Check")); com_Column = var_Column;
		var_Editor1 = com_Column.Editor(); com_Editor1 = var_Editor1;
			com_Editor1.EditType(19/*CheckValueType*/);
			com_Editor1.Option(16/*exCheckValue1*/,COMVariant::createFromInt(2));
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(1)),COMVariant::createFromInt(1),COMVariant::createFromInt(0));
		com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(2)),COMVariant::createFromInt(1),COMVariant::createFromInt(1));
	exgrid1.EndUpdate();
}
921
How do I set a locked check-box

public void init()
{
	COM com_Column,com_Column1,com_Editor,com_Editor1,com_Items;
	anytype var_Column,var_Column1,var_Editor,var_Editor1,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("Locked-Check")); com_Column = var_Column;
		var_Editor = com_Column.Editor(); com_Editor = var_Editor;
			com_Editor.EditType(19/*CheckValueType*/);
			com_Editor.Option(16/*exCheckValue1*/,COMVariant::createFromInt(2));
			com_Editor.Locked(true);
	var_Column1 = COM::createFromVariant(exgrid1.Columns().Add("Unlocked-Check")); com_Column1 = var_Column1;
		var_Editor1 = com_Column1.Editor(); com_Editor1 = var_Editor1;
			com_Editor1.EditType(19/*CheckValueType*/);
			com_Editor1.Option(17/*exCheckValue2*/,COMVariant::createFromInt(1));
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(1)),COMVariant::createFromInt(1),COMVariant::createFromInt(0));
		com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(0)),COMVariant::createFromInt(1),COMVariant::createFromInt(1));
	exgrid1.EndUpdate();
}
920
Does the title of the cell's tooltip supports HTML format

public void init()
{
	COM com_Column,com_Items;
	anytype var_Column,var_Items;
	str var_s;
	;

	super();

	exgrid1.BeginUpdate();
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("")); com_Column = var_Column;
		com_Column.Caption("");
		com_Column.HTMLCaption("Column");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		var_s = "<c><b><fgcolor=FF0000>Title</fgcolor></b><br>This is bit of text that's shown when the user hovers the cell. This shows the titl";
		var_s = var_s + "e centered with a different color.";
		com_Items.CellToolTip(com_Items.AddItem("tooltip w/h different title"),COMVariant::createFromInt(0),var_s);
	exgrid1.EndUpdate();
}
919
How do I specify a different title for the cell's tooltip

public void init()
{
	COM com_Column,com_Items;
	anytype var_Column,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("")); com_Column = var_Column;
		com_Column.Caption("This is the title");
		com_Column.HTMLCaption("Column");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.CellToolTip(com_Items.AddItem("tooltip w/h different title"),COMVariant::createFromInt(0),"This is bit of text that's shown when the user hovers the cell.");
	exgrid1.EndUpdate();
}
918
The cell's tooltip displays the column's caption in its title. How can I get ride of that

public void init()
{
	COM com_Column,com_Columns,com_Items;
	anytype var_Column,var_Columns,var_Items;
	int h;
	;

	super();

	exgrid1.BeginUpdate();
	var_Columns = exgrid1.Columns(); com_Columns = var_Columns;
		com_Columns.Add("C1");
		com_Columns.Add("C2");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h = com_Items.AddItem("tooltip w/h caption");
		com_Items.CellToolTip(h,COMVariant::createFromInt(0),"This is bit of text that's shown when the user hovers the cell. This shows the column's caption in the title.");
		com_Items.CellValue(h,COMVariant::createFromInt(1),"tooltip no caption");
		com_Items.CellToolTip(h,COMVariant::createFromInt(1),"This is bit of text that's shown when the user hovers the cell. This shows no column's caption in the title.");
	var_Column = COM::createFromObject(exgrid1.Columns()).Item("C2"); com_Column = var_Column;
		com_Column.HTMLCaption(com_Column.Caption());
		com_Column.Caption("");
	exgrid1.EndUpdate();
}
917
How can I programmatically show the column's filter

// RClick event - Fired when right mouse button is clicked
void onEvent_RClick()
{
	COM com_Column;
	anytype var_Column;
	int i;
	;
	i = exgrid1.ItemFromPoint(-1,-1,c,hit);
	var_Column = COM::createFromObject(exgrid1.Columns()).Item(c); com_Column = var_Column;
	com_Column.ShowFilter("-1,-1,128,128");
}

public void init()
{
	COM com_Column,com_Items;
	anytype var_Column,var_Items;
	int i;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ShowFocusRect(false);
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("Items ")); com_Column = var_Column;
		com_Column.DisplayFilterPattern(false);
		com_Column.FilterList(9472/*exShowExclude | exShowFocusItem | exShowCheckBox*/);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.AddItem("Item 1");
		com_Items.AddItem("Item 2");
		com_Items.AddItem("Item 3");
	exgrid1.EndUpdate();
}
916
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 2)

// ColumnClick event - Fired after the user clicks on column's header.
void onEvent_ColumnClick(COM   _Column)
{
	// Column.SortOrder = 1
	COM com_Column;
	anytype var_Column;
	;
	exgrid1.SortOnClick(-1/*exDefaultSort*/);
	var_Column = COM::createFromObject(exgrid1.Columns()).Item("Sort"); com_Column = var_Column;
	com_Column.SortOrder(1/*SortAscending*/);
	exgrid1.SortOnClick(1/*exUserSort*/);
}

public void init()
{
	COM com_Column,com_Items;
	anytype var_Column,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.SortOnClick(1/*exUserSort*/);
	exgrid1.Columns().Add("Items");
	COM::createFromVariant(exgrid1.Columns().Add("Sort")).Visible(false);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.CellValue(com_Items.AddItem("Item 1 (3)"),COMVariant::createFromInt(1),COMVariant::createFromInt(3));
		com_Items.CellValue(com_Items.AddItem("Item 2 (1)"),COMVariant::createFromInt(1),COMVariant::createFromInt(1));
		com_Items.CellValue(com_Items.AddItem("Item 3 (2)"),COMVariant::createFromInt(1),COMVariant::createFromInt(2));
	exgrid1.EndUpdate();
}
915
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 1)

// ColumnClick event - Fired after the user clicks on column's header.
void onEvent_ColumnClick(COM   _Column)
{
	// Column.SortOrder = 1
	;
	exgrid1.Items().SortChildren(0,"Sort",true);
}

public void init()
{
	COM com_Items;
	anytype var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.SortOnClick(1/*exUserSort*/);
	exgrid1.Columns().Add("Items");
	COM::createFromVariant(exgrid1.Columns().Add("Sort")).Visible(false);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.CellValue(com_Items.AddItem("Item 1 (3)"),COMVariant::createFromInt(1),COMVariant::createFromInt(3));
		com_Items.CellValue(com_Items.AddItem("Item 2 (1)"),COMVariant::createFromInt(1),COMVariant::createFromInt(1));
		com_Items.CellValue(com_Items.AddItem("Item 3 (2)"),COMVariant::createFromInt(1),COMVariant::createFromInt(2));
	exgrid1.EndUpdate();
}
914
How can I highlight the cell's button with a different appearance, when cursor hovers it

public void init()
{
	COM com_Column,com_Items;
	anytype var_Column,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn");
	exgrid1.DefaultItemHeight(22);
	exgrid1.TreeColumnIndex(-1);
	exgrid1.SelForeColor(WinApi::RGB2int(0,0,0));
	exgrid1.SelBackColor(exgrid1.BackColor());
	exgrid1.Background(157/*exCursorHoverCellButton*/,0x1000000);
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("Buttons")); com_Column = var_Column;
		com_Column.Def(2/*exCellHasButton*/,COMVariant::createFromBoolean(true));
		com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1));
		com_Column.Alignment(1/*CenterAlignment*/);
		com_Column.HeaderAlignment(1/*CenterAlignment*/);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.AddItem("Button <b>1</b>");
		com_Items.AddItem("Button <b>2</b>");
		com_Items.AddItem("Button <b>3</b>");
	exgrid1.EndUpdate();
}
913
How can I prevent highlighting the cell's button while cursor hovers it

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void onEvent_AddItem(int   _Item)
{
	COM com_Items;
	anytype var_Items;
	;
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.CellValue(_Item,COMVariant::createFromInt(0),"Button <b>A</b>");
		com_Items.CellValue(_Item,COMVariant::createFromInt(1),"Button <b>B</b>");
}

public void init()
{
	COM com_Column,com_Column1,com_Items;
	anytype var_Column,var_Column1,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.DefaultItemHeight(22);
	exgrid1.TreeColumnIndex(-1);
	exgrid1.SelForeColor(WinApi::RGB2int(0,0,0));
	exgrid1.SelBackColor(exgrid1.BackColor());
	exgrid1.Background(157/*exCursorHoverCellButton*/,-1);
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("A")); com_Column = var_Column;
		com_Column.Def(2/*exCellHasButton*/,COMVariant::createFromBoolean(true));
		com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1));
		com_Column.Alignment(1/*CenterAlignment*/);
		com_Column.HeaderAlignment(1/*CenterAlignment*/);
	var_Column1 = COM::createFromVariant(exgrid1.Columns().Add("B")); com_Column1 = var_Column1;
		com_Column1.Def(2/*exCellHasButton*/,COMVariant::createFromBoolean(true));
		com_Column1.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1));
		com_Column1.Alignment(1/*CenterAlignment*/);
		com_Column1.HeaderAlignment(1/*CenterAlignment*/);
	COM::createFromVariant(exgrid1.Columns().Add("")).Position(1);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.CellEnabled(com_Items.AddItem(""),COMVariant::createFromInt(1),false);
		com_Items.AddItem("");
		com_Items.AddItem("");
	exgrid1.EndUpdate();
}
912
How can I change the image of the icon while performing OLE Drag and Drop

// OLEStartDrag event is not supported. Use the DragEnter,DragLeave,DragOver, DragDrop ... events.
public void init()
{
	COM com_Appearance,com_Items;
	anytype var_Appearance,var_Items;
	str var_s,var_s1;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.OLEDropMode(1/*exOLEDropManual*/);
	exgrid1.ColumnAutoResize(false);
	exgrid1.DefaultItemHeight(22);
	exgrid1.HeaderHeight(exgrid1.DefaultItemHeight());
	COM::createFromVariant(exgrid1.Columns().Add("Default")).Width(128);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.AddItem("Item 1");
		com_Items.AddItem("Item 2");
		com_Items.AddItem("Item 3");
		com_Items.AddItem("Item 4");
		com_Items.AddItem("Item 5");
	var_Appearance = exgrid1.VisualAppearance(); com_Appearance = var_Appearance;
		var_s = "gBFLBCJwBAEHhEJAAChABakMACAADACAxRDQNABQKAAzQFAYaBiG6GAAGEaRYgmFgAQhFcZQSKUOQTDKMIziYBYfgkMIgSbJUgDGAkRRdDSOYDmGQYDiCIoRShOMIjHL";
		var_s = var_s + "UXxtDaIZwhEAoJb+RgAUY/cTzaAEUwHHiTKInaCQIhsC4JUJAdRURQ9EwvCIZBpEWwLChENQwWLCNj2TScBwjCyqbale45ViqdoDU8lORLUi+M4zSBPcZVTRtGShPDBK";
		var_s = var_s + "TjMLaYgkIIlVpRNa0PC1GTzQ6mazkKQLRADDIDVbAeL3LiMBy9LyLLItQALByua5mWhbcZyBCOPgBTrRb5zO58FjuTK7YLjMB7NrUNYtFaUMy2OpOCADIaecTNcaWLxP";
		var_s = var_s + "F2MY1HWYxVj2Jw3DuRJonKYB5lKAYkkYdA6hyDIjBkApaFoAAhBMfYxiGNAkFECZnm4YQBgiOgDl2URSE4KAEj2AJKigFgGgGYIIAyPQ6CCRogAAOxhAMSgSDgIRDhYF";
		var_s = var_s + "oFmGCBmBQOAMjgdgQDsUITEIIg5iISAEmIOBigiJgqgqYhoFyVILyyMgyDmYxDg4rBjgiZg6g0Dh4kiTIMGMKAwmgOQkEkFhGhGZIJAoPoQAyQ4mE6BhlAkRgXhODoZC";
		var_s = var_s + "0A4Pg6KRmCSFplkkdheDmJYTioVgACOY4uGaDwmgmJhqg8JlWmOGRmGkChyhyZxJAobYbmMI4yHqFQnkmdh+2RYp4DMIZ5gaBohmiCYGB+IJOmoNhtiPXZGG2I1tgyb4";
		var_s = var_s + "lmgGhmhqJt0Fyb4gk8CtsCiahKhYH4oXiAohiUKpKjaLt+goDJxiyaZqlaNot4OTJx3gKp2iiL5sAsBoov+KgMnOMZrisJpKjLjocnPeBLEaRI0m0SxWkSNBPEoDJ1ja";
		var_s = var_s + "bJrHaXo35obOZC2OximaOZugsYpi3ga42mKO5vAuRpijsTxqAyd49m8S5mnqPuqFyd4gk+DAGn6QJwEwFp+kAT+BnmQpwgwNwOkPtYsnnrgsFcEpFnGDBnBKRRPiwUwc";
		var_s = var_s + "kecgMgcIpHGMKQwnuSZygyJ1/HKOgMnyS5zAyRwykycw5g4Eg0jCA57DqTpzkydw+kIDR9AUCY9A2HQXBIUh0g0JRJ5aUxmnQZIPnkUgvDUI5tFcVoPjUOB+A4QBAICA";
		com_Appearance.Add(1,COMVariant::createFromStr(var_s));
		var_s1 = "gBFLBCJwBAEHhEJAAChABC8MACAADACAxRDQNABQKAAzQFAYaBiG6GAAGEaRYgmFgAQhFcZQSKUOQTDKMIziaQIRDINQlSTJcQjKKEUQTFiXIyAKKwEgmEQMQiCcbzXI";
		var_s1 = var_s1 + "UBxAAqXZZFUaKAgOMJDTLBAzUTCQbR7HiQYyBeCQOo+VoaSACEIlAZJRjoOo5DJGGQILlQJqyYrpaAxIgkEJuTqGoQaXgle53PJeLpXW5Nez9P7AMBwK7bbaqeTyXa+e";
		var_s1 = var_s1 + "DtJhif4cXjIMhyLI8UxXEKOL7jDSYPgqK48QhCEJQPQ9EyXJqnahoemCeRXBZ+aqxbBsCwCep0YBeNr3HaNaz3PK/brtWxMDpeA5IYhhF7WdZFR4tMrOdAtHL9FyPJ5T";
		var_s1 = var_s1 + "FicgXnoTAKAsRpHPeVhrAUd4LkmY5yj+fQ+i8L4zk+Y5vjCe4oD6ZoNhSRxiisVRKg+T5vnWfB6h6J5yAIf4fieWJFHyHZHHSTAygyAociMKBKEKBIeCiCZyHYFAnCAB";
		var_s1 = var_s1 + "4mBeBQJlgRIegOCgYCySAgh2WAkgINAMmMNIgCcCYoGYLoLmKaIshqCgMliEICgmDRDEiUQmkmAhWDCD5inicIVg4TQYloJg2g2ExYhoJZJEidIThMCQSFyEwkGKaRKF";
		var_s1 = var_s1 + "EJQJBkOhLCUJIDFoRiKBmBJhDeDZZDoPAlgmQhghaGZimmHhphqZopDoYw3GYEgFgGHROGOFJkCSSQCDoTAkiSaQ6C6IBJFkPIUCSJ5CDoeQ5CcVZ5gWHROmONJsCMSI";
		var_s1 = var_s1 + "SByEFyjIRoYiaKYaG6HonEiOhcguJQIHoRJsh0WBWB2JIpiqShKi0OwqnqRouiyTpGhGBxiYIZKOhqGp2j4aRaAqZL3FAECAgA==";
		com_Appearance.Add(2,COMVariant::createFromStr(var_s1));
	exgrid1.Background(33/*exDragDropBefore*/,0x1000000);
	exgrid1.Background(34/*exDragDropAfter*/,0x2000000);
	exgrid1.Background(37/*exDragDropForeColor*/,WinApi::RGB2int(0,0,1));
	exgrid1.EndUpdate();
}
911
How can I sort by two-columns, one by date and one by time

public void init()
{
	COM com_Column,com_Columns,com_Items;
	anytype var_Column,var_Columns,var_Items;
	int h;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.SingleSort(false);
	var_Columns = exgrid1.Columns(); com_Columns = var_Columns;
		COM::createFromVariant(com_Columns.Add("Index")).FormatColumn("1 index ``");
		COM::createFromVariant(com_Columns.Add("Date")).SortType(2/*SortDate*/);
		var_Column = COM::createFromVariant(com_Columns.Add("Time")); com_Column = var_Column;
			com_Column.SortType(4/*SortTime*/);
			com_Column.FormatColumn("time(value)");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h = com_Items.AddItem(COMVariant::createFromInt(0));
		com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("1/1/2001",213)));
		com_Items.CellValue(h,COMVariant::createFromInt(2),COMVariant::createFromUtcDateTime(str2Datetime("1/1/2001 10:00:00",213)));
		h = com_Items.AddItem(COMVariant::createFromInt(0));
		com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("12/31/2000",213)));
		com_Items.CellValue(h,COMVariant::createFromInt(2),COMVariant::createFromUtcDateTime(str2Datetime("1/1/2001 10:00:00",213)));
		h = com_Items.AddItem(COMVariant::createFromInt(0));
		com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("1/1/2001",213)));
		com_Items.CellValue(h,COMVariant::createFromInt(2),COMVariant::createFromUtcDateTime(str2Datetime("1/1/2001 6:00:00",213)));
		h = com_Items.AddItem(COMVariant::createFromInt(0));
		com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("12/31/2000",213)));
		com_Items.CellValue(h,COMVariant::createFromInt(2),COMVariant::createFromUtcDateTime(str2Datetime("1/1/2001 8:00:00",213)));
		h = com_Items.AddItem(COMVariant::createFromInt(0));
		com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("1/1/2001",213)));
		com_Items.CellValue(h,COMVariant::createFromInt(2),COMVariant::createFromUtcDateTime(str2Datetime("1/1/2001 8:00:00",213)));
		h = com_Items.AddItem(COMVariant::createFromInt(0));
		com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("12/31/2000",213)));
		com_Items.CellValue(h,COMVariant::createFromInt(2),COMVariant::createFromUtcDateTime(str2Datetime("1/1/2001 6:00:00",213)));
	exgrid1.Layout("multiplesort=\"C1:1 C2:1\"");
	exgrid1.EndUpdate();
}
910
How can I display a context menu

// MouseUp event - Occurs when the user releases a mouse button.
void onEvent_MouseUp(int   _Button,int   _Shift,int   _X,int   _Y)
{
	COM com_ExContextMenu,com_Items;
	anytype var_ExContextMenu,var_Items;
	;
	// Add 'excontextmenu.dll(ExContextMenu.dll)' reference to your project.
	// Add 'ExContextMenu 1.0 Type Library(ExContextMenu.dll)' reference to your project.
	var_ExContextMenu = COM::createFromObject(new EXCONTEXTMENULib.excontextmenu()); com_ExContextMenu = var_ExContextMenu;
		var_Items = COM::createFromObject(com_ExContextMenu.Items()); com_Items = var_Items;
		com_Items.ToString("Check[chk],[sep],Item 1,Item 2,Item 3");
		print( com_ExContextMenu.Select() );
}

public void init()
{
	COM com_ExContextMenu,com_Items,com_rs;
	anytype rs,var_ExContextMenu,var_Items;
	;

	super();

	exgrid1.ColumnAutoResize(false);
	exgrid1.ScrollBySingleLine(true);
	exgrid1.ContinueColumnScroll(false);
	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs;
		rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exgrid1.DataSource(rs);
	exgrid1.ReadOnly(-1/*exReadOnly*/);
}
909
Also, are there any plans on the ability to put borders on individual cells or rows or columns

public void init()
{
	COM com_Appearance,com_Items;
	COMVariant hx;
	anytype var_Appearance,var_Items;
	int h;
	str var_s,var_s1,var_s2,var_s3;
	;

	super();

	exgrid1.BeginUpdate();
	var_Appearance = exgrid1.VisualAppearance(); com_Appearance = var_Appearance;
		var_s = "gBFLBCJwBAEHhEJAAChABOUGACAADACAxRDQNABQKAAzQFAYbBkGqGAAGIYxYgmFgAQhFcZQSpEEg7BKMYwjOJgFgmEQxDANIBQSKoaQiGQYRhkEYgEiONoaDJCM4wHI";
		var_s = var_s + "MQxHCKTZRkGYpajOPobUbGUywHRcRRvH6EZQGWg6GjqK43SCEEZhJBNGyTJ6BZbGURbCqSLAwWZAYy2RCMRxDJqLKypSwKPoGKosS5OUwzHItaRtHaJJAwKZ6ApGQpRV";
		var_s = var_s + "TAYxVfC1PzkACma4nS7oXraVJFVZTdYwTh+JABTzGLpnKw7FhGa5pABpdq0RTuOZdAbPMoyXBrXqqB46UCOGg5HRWWwHR7ZIquap9JzfCq5cRbWr5BBOPaBYKwdD1CB+";
		var_s = var_s + "iMVRnlQRY4hafZwAMH5Pl4XQnjCEBECSIBpDGHQOicIwtBIBpmiWEIJj6eJQloEgomafgyGGCI6kKYZQH+igGAKAJgEgFgGgGYIFlCf4CmCSA2A6A5hAgRgEgQYRIFYF";
		var_s = var_s + "IEmEaBmBmBghigdgQgcIZogYC4ICIKB6CSCRhiiHgogWIooi4F4AmKaIaDCDBihiTg0gsIIYmYOoOmOSJ2D6AZQBAgI=";
		com_Appearance.Add(1,COMVariant::createFromStr(var_s));
		var_s1 = "gBFLBCJwBAEHhEJAAChABdUIQAAYAQGKIaBoAKBQAGaAoDDYMg1QwAAxDGLEEwsACEIrjKCVIgkHYJRjGEZxNCMIhiGAaQChEZYHgkMomDAOEgyHKcEgJGyEQgkOa4aj";
		var_s1 = var_s1 + "CKYrSzAcrwTI4cRVHiQZygOZ4DBSOY8VBAcQweItJhrKqVRgriitNQjCyjZCpOaIDooAJmRZNNISBBIEQSKA0TDOQ5TSKUMYhOZTBBEbbMNBtBIUIRpajbMBiFywUxUO";
		var_s1 = var_s1 + "JYXhmG4dR7IMhyLI8UxXFo7P7mOZZXjmO49T7Kc70LQ9CyHJKnabpWoaXj2VZZV7Mda2DTNSzPKK1bZpG4bTouKZ5WjfN72fgeCzrF7HchyPJcXxnG4ZAMBA";
		com_Appearance.Add(2,COMVariant::createFromStr(var_s1));
		var_s2 = "gBFLBCJwBAEHhEJAAChABL0GACAADACAxRDQNABQKAAzQFAYbBkGqGAAGIYxYgmFgAQhFcZQSpEEg7BKMYwjOJgEgmEQxDANIBQSKoaQiGQYRhkEYpFiONoXDJCM4wHI";
		var_s2 = var_s2 + "MQxHCKTZRkGYpajOPobUbGUygBRdExvEyEZQGWg6GjqK43SCEEZhJBNGyfH6dBpEWT7ChENQwWLLFoRDIcQyXCytIDter4boGKosS5OUwzGAtaRvHaJJAwKZ6ApGQpRV";
		var_s2 = var_s2 + "TAYxUdC1HTjJiEa4nS7oXraVJFVZTdYwTh+JABTzGKbsSycKqWaqkABZeoWbTuOZdAbPMoyXBrXgOLYzUCOGg5HRWWwHR7ZIq0Pg9Hqaa4bVbIVxbcAGH6BQa6J5hEBE";
		var_s2 = var_s2 + "CSIBpDGHQOicIwtBIBpmhqEIJj2eJQloEgokiegyGGCI6kKZ5BnefA+D8L4flOa52nufg+g+f5fnPFB/ooBZ1omSAWASAJgGgJgJgIIIoDYAIDCCaBFnuBAhCgOgUgUY";
		var_s2 = var_s2 + "IoF4GIBiGKBuAcfohmgNgdggX54g4JB/F+GImCqCpikiNguguUAQICA=";
		com_Appearance.Add(3,COMVariant::createFromStr(var_s2));
		var_s3 = "gBFLBCJwBAEHhEJAAChABBUGACAADACAxRDQNABQKAAzQFAYbBkGqGAAGIYxYgmFgAQhFcZQSpEEg7BKMYwjOJgCgmEQxDANMiwGKoaQiGQYRhkEYgFiONoaDJCM4wHI";
		var_s3 = var_s3 + "MQxHCKTZRkGYpajOPobUbAYQQSAkEgpECbZqoEZaDoaOorTZINJ0VR1Ox5KKfZyGURZPqOEQ1DBZEI2RZUbxDJquLhACj7AjeZZtRJZVp2TY9eQ3LC3aYhGqwAwSFpJV";
		var_s3 = var_s3 + "jUEBgRBJIDSMY6DpOIxaEgNZpwEITOTxUK0EhRLy5agDCJ1QrCdanahqOpaXpmW5dV7YNh2LTnfzXNq3bhuO5bXqOd59X7fN54Dg+D4LRLHbpxXIcXqvFaZZDnOb4ToP";
		var_s3 = var_s3 + "EuAZUmqcB2B2DoHGuN5Tm6d46lsPwfhOS5mnOeg9DqCAIICA";
		com_Appearance.Add(4,COMVariant::createFromStr(var_s3));
	exgrid1.LinesAtRoot(1/*exGroupLinesAtRoot*/);
	exgrid1.SelBackColor(exgrid1.BackColor());
	exgrid1.SelForeColor(exgrid1.ForeColor());
	exgrid1.DefaultItemHeight(22);
	exgrid1.Columns().Add("");
	COM::createFromVariant(exgrid1.Columns().Add("")).Def(4/*exCellBackColor*/,COMVariant::createFromInt(33554432));
	exgrid1.Columns().Add("");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h = com_Items.AddItem("Root 1");
		com_Items.ItemBackColor(h,0x1000000);
		hx = com_Items.SplitCell(h,COMVariant::createFromInt(0));
		com_Items.CellValue(COMVariant::createFromInt(0),hx,"count(current,dir,1)");
		com_Items.CellValueFormat(COMVariant::createFromInt(0),hx,4/*exTotalField*/);
		com_Items.FormatCell(COMVariant::createFromInt(0),hx,"'Childs: ' + value");
		com_Items.CellBackColor(COMVariant::createFromInt(0),hx,0x3000000);
		com_Items.CellHAlignment(COMVariant::createFromInt(0),hx,1/*CenterAlignment*/);
		com_Items.InsertItem(h,,"Child 1");
		com_Items.InsertItem(h,,"Child 2");
		com_Items.ExpandItem(h,true);
		h = com_Items.AddItem("Root 2");
		com_Items.ItemBackColor(h,0x4000000);
		hx = com_Items.SplitCell(h,COMVariant::createFromInt(0));
		com_Items.CellValue(COMVariant::createFromInt(0),hx,"count(current,dir,1)");
		com_Items.CellValueFormat(COMVariant::createFromInt(0),hx,4/*exTotalField*/);
		com_Items.FormatCell(COMVariant::createFromInt(0),hx,"'Childs: ' + value");
		com_Items.CellBackColor(COMVariant::createFromInt(0),hx,0x3000000);
		com_Items.CellHAlignment(COMVariant::createFromInt(0),hx,1/*CenterAlignment*/);
		com_Items.InsertItem(h,,"Child 1");
		com_Items.InsertItem(h,,"Child 2");
		com_Items.InsertItem(h,,"Child 3");
		com_Items.ItemBackColor(com_Items.InsertItem(h,,"Child 4"),0x4000000);
	exgrid1.EndUpdate();
}
908
How can I decode the Layout property
public void init()
{
	COM com_Column,com_Columns,com_Items,com_Print;
	anytype var_Column,var_Columns,var_Items,var_Print;
	;

	super();

	exgrid1.BeginUpdate();
	var_Columns = exgrid1.Columns(); com_Columns = var_Columns;
		com_Columns.Add("C1");
		COM::createFromVariant(com_Columns.Add("C2")).Position(1);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.CellValue(com_Items.AddItem("SubItem 1.1"),COMVariant::createFromInt(1),"SubItem 1.2");
		com_Items.CellValue(com_Items.AddItem("SubItem 2.1"),COMVariant::createFromInt(1),"SubItem 2.2");
	var_Column = COM::createFromObject(exgrid1.Columns()).Item("C2"); com_Column = var_Column;
	com_Column.SortOrder(2/*SortDescending*/);
	exgrid1.EndUpdate();
	print( "Encoded:" );
	print( exgrid1.Layout() );
	// Add 'exprint.dll(ExPrint.dll)' reference to your project.
	// Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project.
	var_Print = COM::createFromObject(new EXPRINTLib.exprint()); com_Print = var_Print;
		print( "Decoded: " );
		print( com_Print.Decode64TextW(exgrid1.Layout()) );
}
907
No new line is shown if using <br> tag. How can I show a new line with-in the cell

public void init()
{
	COM com_Column,com_Column1,com_Items;
	anytype var_Column,var_Column1,var_Items;
	int h;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ScrollBySingleLine(true);
	exgrid1.DrawGridLines(-2/*exRowLines*/);
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("Single-Line")); com_Column = var_Column;
		com_Column.Def(16/*exCellSingleLine*/,COMVariant::createFromBoolean(true));
		com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1));
	var_Column1 = COM::createFromVariant(exgrid1.Columns().Add("Multiple-Lines")); com_Column1 = var_Column1;
		com_Column1.Def(16/*exCellSingleLine*/,COMVariant::createFromBoolean(false));
		com_Column1.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1));
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.CellValue(com_Items.AddItem("First-Line<br>Second-Line"),COMVariant::createFromInt(1),"First-Line<br>Second-Line");
		h = com_Items.AddItem("First-Line<br>Second-Line<br>Third-Line");
		com_Items.CellSingleLine(h,false);
		com_Items.CellHAlignment(h,COMVariant::createFromInt(0),1/*CenterAlignment*/);
		com_Items.ItemDivider(h,0);
	exgrid1.EndUpdate();
}
906
I am using exCRD to layout the columns in the grid, but is there a way where I can have the text in a cell wrap if it's exceeds the width of the cell instead of showing the ...'s

public void init()
{
	COM com_Column,com_Column1,com_Column2,com_Column3,com_Column4,com_Columns,com_Editor,com_Items;
	anytype var_Column,var_Column1,var_Column2,var_Column3,var_Column4,var_Columns,var_Editor,var_Items;
	int h;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.DrawGridLines(-2/*exRowLines*/);
	exgrid1.DefaultItemHeight(36);
	exgrid1.FullRowSelect(0/*exColumnSel*/);
	var_Columns = exgrid1.Columns(); com_Columns = var_Columns;
		var_Column = COM::createFromVariant(com_Columns.Add("Column1")); com_Column = var_Column;
			com_Column.Visible(false);
			var_Editor = COM::createFromObject(com_Column.Editor()); com_Editor = var_Editor;
			com_Editor.EditType(1/*EditType*/);
		var_Column1 = COM::createFromVariant(com_Columns.Add("Column2")); com_Column1 = var_Column1;
			com_Column1.Visible(false);
			var_Editor = COM::createFromObject(com_Column1.Editor()); com_Editor = var_Editor;
			com_Editor.EditType(1/*EditType*/);
		var_Column2 = COM::createFromVariant(com_Columns.Add("Column3")); com_Column2 = var_Column2;
			com_Column2.Visible(false);
			com_Column2.Def(16/*exCellSingleLine*/,COMVariant::createFromBoolean(false));
			var_Editor = COM::createFromObject(com_Column2.Editor()); com_Editor = var_Editor;
			com_Editor.EditType(1/*EditType*/);
		var_Column3 = COM::createFromVariant(com_Columns.Add("Column4")); com_Column3 = var_Column3;
			com_Column3.Alignment(1/*CenterAlignment*/);
			com_Column3.HeaderAlignment(1/*CenterAlignment*/);
			com_Column3.Visible(false);
			com_Column3.Def(2/*exCellHasButton*/,COMVariant::createFromBoolean(true));
			com_Column3.Def(3/*exCellButtonAutoWidth*/,COMVariant::createFromBoolean(true));
		var_Column4 = COM::createFromVariant(com_Columns.Add("FormatLevel")); com_Column4 = var_Column4;
			com_Column4.FormatLevel("(0/1),\"Information to be shown on the control's header\"[a=17][ww]:128,3:128");
			com_Column4.Def(32/*exCellFormatLevel*/,"(0/1),2[a=17][ww]:128,3:128");
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h = com_Items.AddItem("Cell 1.1");
		com_Items.CellValue(h,COMVariant::createFromInt(1),"Cell 1.2");
		com_Items.CellValue(h,COMVariant::createFromInt(2),"This is just a bit of information on first row");
		com_Items.CellValue(h,COMVariant::createFromInt(3),"Cell 1.4");
		com_Items.CellSingleLine(h,COMVariant::createFromInt(3),false);
		h = com_Items.AddItem("Cell 2.1");
		com_Items.CellValue(h,COMVariant::createFromInt(1),"Cell 2.2");
		com_Items.CellValue(h,COMVariant::createFromInt(2),"This is just a bit of information on second row");
		com_Items.CellValue(h,COMVariant::createFromInt(3),"Cell 2.4");
	exgrid1.EndUpdate();
}
905
How can I load pictures using URL ( http:// )
public void init()
{
	COM com_http;
	anytype http;
	;

	super();

	// Add 'exhttp.dll(ExHTTP.dll)' reference to your project.
	// Add 'ExHTTP 1.0 Control Library(ExHTTP.dll)' reference to your project.
	http = COM::createFromObject(new EXHTTPLib.exhttp()); com_http = http;
	exgrid1.PictureDisplay(34/*LowerRight*/);
	exgrid1.Picture(http.GETImage("http://mail.exontrol.com/images/exontrol.png"));
}
904
How can I filter programmatically by multiple columns
public void init()
{
	COM com_Column,com_Column1,com_Column2,com_Column3,com_Columns,com_Items;
	anytype var_Column,var_Column1,var_Column2,var_Column3,var_Columns,var_Items;
	int h;
	;

	super();

	exgrid1.BeginUpdate();
	var_Columns = exgrid1.Columns(); com_Columns = var_Columns;
		com_Columns.Add("Name");
		var_Column = COM::createFromVariant(com_Columns.Add("Active")); com_Column = var_Column;
			com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true));
			com_Column.DisplayFilterButton(true);
		com_Columns.Add("Type");
		COM::createFromVariant(com_Columns.Add("Mode")).FilterType(240/*exFilter*/);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		h = com_Items.AddItem("Item A");
		com_Items.CellState(h,COMVariant::createFromInt(1),1);
		com_Items.CellValue(h,COMVariant::createFromInt(2),"A");
		h = com_Items.AddItem("Item B");
		com_Items.CellState(h,COMVariant::createFromInt(1),0);
		com_Items.CellValue(h,COMVariant::createFromInt(2),"B");
		h = com_Items.AddItem("Item C");
		com_Items.CellState(h,COMVariant::createFromInt(1),1);
		com_Items.CellValue(h,COMVariant::createFromInt(2),"C");
		com_Items.CellValue(h,COMVariant::createFromInt(3),"None");
		h = com_Items.AddItem("Item D");
		com_Items.CellState(h,COMVariant::createFromInt(1),1);
		com_Items.CellValue(h,COMVariant::createFromInt(2),"C");
	var_Column1 = COM::createFromObject(exgrid1.Columns()).Item(COMVariant::createFromInt(1)); com_Column1 = var_Column1;
		com_Column1.FilterType(6/*exCheck*/);
		com_Column1.Filter(1);
	var_Column2 = COM::createFromObject(exgrid1.Columns()).Item(COMVariant::createFromInt(2)); com_Column2 = var_Column2;
		com_Column2.FilterType(240/*exFilter*/);
		com_Column2.Filter("C");
	var_Column3 = COM::createFromObject(exgrid1.Columns()).Item(COMVariant::createFromInt(3)); com_Column3 = var_Column3;
		com_Column3.FilterType(2/*exNonBlanks*/);
	exgrid1.ApplyFilter();
	exgrid1.EndUpdate();
}
903
How can I add Right-To-Left Reading-Order / RTL Layout
public void init()
{
	COM com_Column,com_Items;
	anytype var_Column,var_Items;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.TreeColumnIndex(-1);
	var_Column = COM::createFromVariant(exgrid1.Columns().Add("RTL - Header Caption")); com_Column = var_Column;
		com_Column.HeaderAlignment(131074/*0x20002 | RightAlignment*/);
		com_Column.Alignment(131074/*0x20002 | RightAlignment*/);
	exgrid1.FullRowSelect(0/*exColumnSel*/);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.AddItem("RTL - Text Right");
		com_Items.CellHAlignment(com_Items.AddItem("RTL - Text Center"),COMVariant::createFromInt(0),131073/*0x20001 | CenterAlignment*/);
		com_Items.CellHAlignment(com_Items.AddItem("RTL - Text Left"),COMVariant::createFromInt(0),131072);
	exgrid1.EndUpdate();
}
902
I have applied ebn to the grid using the following code, and noticed that it applies to the filter dropdownList too. Is there a way to prevent this behavior, like keeping the Filter dropdownlist intact

public void init()
{
	COM com_Items;
	anytype var_Items;
	;

	super();

	exgrid1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn");
	exgrid1.Appearance(16777216);
	exgrid1.BackColorHeader(0x1000000);
	exgrid1.Background(26/*exBackColorFilter*/,0x8000000f);
	COM::createFromVariant(exgrid1.Columns().Add("Filter")).DisplayFilterButton(true);
	var_Items = exgrid1.Items(); com_Items = var_Items;
		com_Items.AddItem("Item 1");
		com_Items.AddItem("Item 2");
}
901
The tree lines from the group parent to its children are missing and no identation is present: the parent and all its children are on the same offset from left. What canbe done

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void onEvent_AddGroupItem(int   _Item)
{
	COM com_Items;
	anytype var_Items;
	int nGroupColumn;
	;
	var_Items = exgrid1.Items(); com_Items = var_Items;
		nGroupColumn = com_Items.GroupItem(_Item);
		com_Items.ItemDivider(_Item,-1);
		com_Items.FormatCell(_Item,COMVariant::createFromInt(0),com_Items.FormatCell(_Item,nGroupColumn));
		com_Items.CellValue(_Item,COMVariant::createFromInt(0),COMVariant::createFromStr(exgrid1.Columns().Item(nGroupColumn).GroupByTotalField()));
		com_Items.CellValueFormat(_Item,COMVariant::createFromInt(0),com_Items.CellValueFormat(_Item,nGroupColumn));
}

public void init()
{
	COM com_Column,com_Column1,com_Items,com_rs;
	anytype rs,var_Column,var_Column1,var_Items;
	int nGroupColumn;
	;

	super();

	exgrid1.BeginUpdate();
	exgrid1.ReadOnly(-1/*exReadOnly*/);
	exgrid1.ColumnAutoResize(false);
	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs;
		rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exgrid1.DataSource(rs);
	exgrid1.SortBarVisible(true);
	exgrid1.SortBarCaption("Drag a <b>column</b> header here to group by that column.");
	exgrid1.AllowGroupBy(true);
	var_Column = COM::createFromObject(exgrid1.Columns()).Item(COMVariant::createFromInt(0)); com_Column = var_Column;
		com_Column.AllowGroupBy(false);
		com_Column.Width(96);
	var_Column1 = COM::createFromObject(exgrid1.Columns()).Item(COMVariant::createFromInt(1)); com_Column1 = var_Column1;
	com_Column1.SortOrder(1/*SortAscending*/);
	exgrid1.LinesAtRoot(-1/*exLinesAtRoot*/);
	exgrid1.EndUpdate();
}